diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index ae2b511c..eab9cf4e 100644 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -1635,7 +1635,7 @@ def loop_misc(self): if self._state == mqtt_cs_disconnecting: rc = MQTT_ERR_SUCCESS else: - rc = 1 + rc = MQTT_ERR_CONN_LOST with self._callback_mutex: if self.on_disconnect: