An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
Hi @Anoop Chandran Greetings! Welcome to Microsoft Q&A forum. Thank you for posting the question here. The close wait state indicates that the socket is waiting for the remote end to close the connection. It is possible that the Azure IoT Hub is not closing the connection after receiving the telemetry data.
I appreciate it if you can check the Azure IoT Hub logs to see if there are any errors or warnings related to the connection. Also, please try increasing the sampleazureiotPROCESS_LOOP_TIMEOUT_MS value to give more time for the connection to close.
Let me know if this helps.