micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

umqtt.simple: Fix MQTTClient publish for connection disruption.

Open khrystynaO opened this issue 1 year ago • 0 comments

Method now handles OSError: -1 after many packets, attempting reconnection.

Issue #754

Modified the MQTTClient publish method to gracefully handle connection disruptions. Previously, the method encountered an OSError: -1 after sending a large number of packets, leading to a disconnection from the server. The updated method now includes error handling to detect this situation and attempts to reconnect before retrying the operation. This enhancement ensures that the client can recover from connection disruptions seamlessly, maintaining stable communication with the server.

khrystynaO avatar Feb 28 '24 15:02 khrystynaO