Skip to content

Commit a88709a

Browse files
committed
fix: Set changed size during iteration for WS broadcast
Fixes #28
1 parent 35840da commit a88709a

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
@@ -273,7 +273,7 @@ async def _broadcast_ws_event(
273273
data = {"kind": "event", "msg": msg, "msg_data": msg_data, "cat": category}
274274
data_dump = json.dumps(data)
275275

276-
for websocket in self._clients:
276+
for websocket in self._clients.copy():
277277
if _LOG.isEnabledFor(logging.DEBUG):
278278
_LOG.debug(
279279
"[%s] =>: %s", websocket.remote_address, filter_log_msg_data(data)

0 commit comments

Comments
 (0)