micropython-lib
micropython-lib copied to clipboard
umqtt.simple: Close old socket on connect
This closes the old socket of the client if one is present during a connection attempt to prevent the initialization of multiple sockets when the function is called repeatedly. It comes in handy if properly disconnecting from the broker isn't possible.