mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-13 05:31:28 -07:00
adding CodeRabbit suggestion plus disconnect()
This commit is contained in:
@@ -65,6 +65,7 @@ def main():
|
|||||||
db.open()
|
db.open()
|
||||||
|
|
||||||
mqtt_start(db)
|
mqtt_start(db)
|
||||||
|
mqtt_client.disconnect()
|
||||||
|
|
||||||
plugin_objects.write_result_file()
|
plugin_objects.write_result_file()
|
||||||
|
|
||||||
@@ -431,7 +432,6 @@ def mqtt_start(db):
|
|||||||
global mqtt_client, mqtt_connected_to_broker
|
global mqtt_client, mqtt_connected_to_broker
|
||||||
|
|
||||||
if not mqtt_connected_to_broker:
|
if not mqtt_connected_to_broker:
|
||||||
mqtt_connected_to_broker = True
|
|
||||||
mqtt_client = mqtt_create_client()
|
mqtt_client = mqtt_create_client()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user