diff --git a/src/controller.py b/src/controller.py index ac00971..ad7e68c 100644 --- a/src/controller.py +++ b/src/controller.py @@ -93,6 +93,7 @@ class Controller: self.mqtt.on_disconnect = self.on_disconnect self.mqtt.connect(self.mqtthost, self.mqttport) self.topic = self.basetopic + self.last_reconnectTry=time.time() @@ -266,7 +267,6 @@ class Controller: if not self.connected: if (time.time()>self.last_reconnectTry+30): self.connectToMQTT() - self.last_reconnectTry=time.time() self.mqtt.loop(0.1) #with block timeout