From b61e871b6c8b514b9c639c0bfc986fabf3e302a3 Mon Sep 17 00:00:00 2001 From: Tristyn Russelo Date: Sun, 26 Mar 2023 13:20:09 -0600 Subject: [PATCH] Update eventStreamer.py test fix for Home Assistant dropping connection after few hours. --- BridgeEmulator/services/eventStreamer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BridgeEmulator/services/eventStreamer.py b/BridgeEmulator/services/eventStreamer.py index 9a1931a8d..4aa043ddf 100644 --- a/BridgeEmulator/services/eventStreamer.py +++ b/BridgeEmulator/services/eventStreamer.py @@ -21,7 +21,7 @@ def streamV2Events(): def generate(): counter = 1000 yield f": hi\n\n" - while counter > 0: # ensure we stop at some point + while True: # ensure we stop at some point if len(HueObjects.eventstream) > 0: for index, messages in enumerate(HueObjects.eventstream): yield f"id: {int(time()) }:{index}\ndata: {json.dumps([messages], separators=(',', ':'))}\n\n"