From 73974df12ae7652432fbcb412a61c90910356ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 13 Feb 2024 00:30:06 +0100 Subject: [PATCH] fixed for loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index 9cef55e..8ec91a7 100644 --- a/server/app.py +++ b/server/app.py @@ -140,7 +140,8 @@ def start_mqtt_publishers(universe_count): print("universe count: "+str(used_universes)) universes_to_publish = list(range(1, used_universes + 1)) # Create and start a thread for each universe - threads = [threading.Thread(target=mqtt_publisher, args=(universe,)) for universe in universes_to_publish] + for universe in universes_to_publish: + threads = [threading.Thread(target=mqtt_publisher, args=(universe,))] for thread in threads: thread.start()