From e93e4521a4d9dcb08c59f2b6dd711a050b192441 Mon Sep 17 00:00:00 2001 From: Arksine Date: Tue, 4 Aug 2020 10:17:05 -0400 Subject: [PATCH] websockets: don't alter dictionary during iteration of "view" Signed-off-by: Eric Callahan --- moonraker/websockets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/websockets.py b/moonraker/websockets.py index 3fff19c..5b81dc0 100644 --- a/moonraker/websockets.py +++ b/moonraker/websockets.py @@ -178,7 +178,7 @@ class WebsocketManager: 'method': "notify_" + name, 'params': [data]}) async with self.ws_lock: - for ws in self.websockets.values(): + for ws in list(self.websockets.values()): try: ws.write_message(notification) except WebSocketClosedError: