You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past reconnect() disconnected on TCP level first and then created new connection to the broker. This is no longer the case and some MQTT broker implementations will (correctly, see below) refuse such reconnect attempts due to duplicate client ID. Previously it worked because _get_connect_socket() used by connect() did self._sock.close() so I assume this changed with the conversion to the connection manager.
The spec says in 3.1.4 Response:
If the ClientId represents a Client already connected to the Server then the Server MUST disconnect the existing Client [MQTT-3.1.4-2].