Skip to content
Snippets Groups Projects
Commit f46dd914 authored by Ellis Percival's avatar Ellis Percival
Browse files

Wait for the client to disconnect cleanly so that we don't accidentally trigger the LWT.

parent 0ff88d57
Branches
Tags
No related merge requests found
......@@ -504,8 +504,11 @@ if __name__ == "__main__":
client.publish(
"%s/%s" % (topic_prefix, config["mqtt"]["status_topic"]),
config["mqtt"]["status_payload_stopped"], qos=1, retain=True)
# This should also quit the mqtt loop thread.
client.loop_stop()
client.disconnect()
client.loop_forever()
for name, gpio in GPIO_MODULES.items():
if not GPIO_CONFIGS[name]["cleanup"]:
_LOG.info("Cleanup disabled for module %r.", name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment