mirror of
https://github.com/ferdzo/iotDashboard.git
synced 2026-04-05 01:06:24 +00:00
Finally fixed.
This commit is contained in:
@@ -64,11 +64,11 @@ def start_mqtt_client():
|
|||||||
# Keep the script running
|
# Keep the script running
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
time.sleep(10) # Sleep to prevent high CPU usage
|
time.sleep(10)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("Script interrupted by user")
|
print("Script interrupted by user")
|
||||||
finally:
|
finally:
|
||||||
client.loop_stop() # Stop the loop when exiting
|
client.loop_stop()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user