fix: none error

This commit is contained in:
Florian Bezannier
2025-10-01 09:12:13 +02:00
committed by Florian BEZANNIER
parent 1dc4d83e3b
commit 29fcbe2333
+5 -3
View File
@@ -120,9 +120,11 @@ class RemoteClient:
return False
def stop(self):
self.mqtt_client.on_disconnect = None
self.mqtt_client.disconnect()
self.update_thread.cancel()
if self.mqtt_client:
self.mqtt_client.on_disconnect = None
self.mqtt_client.disconnect()
if self.update_thread:
self.update_thread.cancel()
def __keep_mqtt(self): # avoid token expiration
timeout = 3600 * 24 # 1 day