Handle MQTT client memory leak

This commit is contained in:
Mark Qvist 2025-03-27 22:16:54 +01:00
parent b2c3411c90
commit a0a6b0fd55
2 changed files with 36 additions and 5 deletions

View file

@ -49,6 +49,9 @@ class MQTT():
time.sleep(MQTT.SCHEDULER_SLEEP)
try: self.disconnect()
except Exception as e: RNS.log(f"An error occurred while disconnecting MQTT server: {e}", RNS.LOG_ERROR)
RNS.log("Stopped MQTT scheduler", RNS.LOG_DEBUG)
def connect_failed(self, client, userdata):