1
0
mirror of https://github.com/thingsboard/thingsboard-gateway synced 2025-10-26 22:31:42 +08:00

Adding information about disconnected and current MQTT client to logging.

This commit is contained in:
zbeacon
2020-03-30 10:02:09 +03:00
parent 332fd8132d
commit 2e10a44876

View File

@@ -78,8 +78,8 @@ class TBClient(threading.Thread):
self.client._on_connect(client, userdata, flags, result_code, *extra_params)
def _on_disconnect(self, client, userdata, result_code):
log.info("TB client %s has been disconnected.", str(client))
# pylint: disable=protected-access
log.info("TB client %s has been disconnected. Current client for connection is: %s", str(client), str(self.client._client))
if self.client._client != client:
client.disconnect()
self.__is_connected = False