Skip to content

Commit

Permalink
Added check is client connected, such as client can be disconnected i…
Browse files Browse the repository at this point in the history
…n wrong way
  • Loading branch information
imbeacon committed Mar 13, 2024
1 parent c3a94e2 commit 63f947c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
with open(path.join(this_directory, 'README.md')) as f:
long_description = f.read()

VERSION = "1.8.5"
VERSION = "1.8.6"

setup(
version=VERSION,
Expand Down
2 changes: 2 additions & 0 deletions tb_device_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,8 @@ def set_server_side_rpc_request_handler(self, handler):
def __sending_thread_main(self):
while not self.stopped:
if not self.is_connected():
if self._client._state == paho.mqtt_cs_connected:
self._on_connect(self._client, None, None, 0)
time.sleep(0.1)
continue
if not self.__rate_limit.check_limit_reached():
Expand Down

0 comments on commit 63f947c

Please sign in to comment.