From 9aca239ea7e95fca9c16113ef1ca9af43fbd64b1 Mon Sep 17 00:00:00 2001 From: bohdan-s Date: Thu, 10 Mar 2022 14:10:01 +1100 Subject: [PATCH] MQTT return false on no server configured --- SunGather/exports/mqtt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/SunGather/exports/mqtt.py b/SunGather/exports/mqtt.py index 0ca0747..6896d1c 100644 --- a/SunGather/exports/mqtt.py +++ b/SunGather/exports/mqtt.py @@ -73,6 +73,7 @@ class export_mqtt(object): logging.warning(f'MQTT: Server Disconnected; {self.mqtt_queue.__len__()} messages queued, will automatically attempt to reconnect') except Exception as err: logging.warning(f'MQTT: Server Error; Server not configured') + return False # qos=0 is set, so no acknowledgment is sent, rending this check useless #elif self.mqtt_queue.__len__() > 10: # logging.warning(f'MQTT: {self.mqtt_queue.__len__()} messages queued, this may be due to a MQTT server issue')