fixed for loop

Signed-off-by: Ebbe Baß <ebbe.bass>
This commit is contained in:
Ebbe Baß
2024-02-13 00:30:06 +01:00
parent ffc64b1f9c
commit 73974df12a
+2 -1
View File
@@ -140,7 +140,8 @@ def start_mqtt_publishers(universe_count):
print("universe count: "+str(used_universes)) print("universe count: "+str(used_universes))
universes_to_publish = list(range(1, used_universes + 1)) universes_to_publish = list(range(1, used_universes + 1))
# Create and start a thread for each universe # 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: for thread in threads:
thread.start() thread.start()