Skip to content

Commit f44656f

Browse files
authored
fix: Set changed size during iteration for WS broadcast (#36)
Fixes #28
1 parent 41b958d commit f44656f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ucapi/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async def _broadcast_ws_event(
284284
data = {"kind": "event", "msg": msg, "msg_data": msg_data, "cat": category}
285285
data_dump = json.dumps(data)
286286

287-
for websocket in self._clients:
287+
for websocket in self._clients.copy():
288288
if _LOG.isEnabledFor(logging.DEBUG):
289289
_LOG.debug(
290290
"[%s] =>: %s", websocket.remote_address, filter_log_msg_data(data)

0 commit comments

Comments
 (0)