fix: none error

This commit is contained in:
Florian Bezannier
2025-09-29 20:20:36 +02:00
parent de9cddbd34
commit 0378af36ef
+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