diff --git a/server/app.py b/server/app.py index 0afa756..fd873d2 100644 --- a/server/app.py +++ b/server/app.py @@ -140,7 +140,9 @@ def start_mqtt_publishers(): print(e) if __name__ == "__main__": - start_mqtt_publishers() + publisher_thread = threading.Thread(target=start_mqtt_publishers()) + publisher_thread.start() + publisher_thread.join() flask_thread = threading.Thread(target=flask_api()) flask_thread.start() flask_thread.join()