Skip to content

Conversation

@zehnm
Copy link
Contributor

@zehnm zehnm commented Nov 24, 2025

In _broadcast_ws_event, the code iterates over self._clients directly. Since await websocket.send() yields control to the event loop, it is possible for a connection to close and be removed from self._clients (in _handle_ws) while the loop in _broadcast_ws_event is running. This causes a RuntimeError: Set changed size during iteration.

Fixes #28

@zehnm zehnm self-assigned this Nov 24, 2025
@zehnm zehnm merged commit f44656f into main Nov 24, 2025
4 checks passed
@zehnm zehnm deleted the fix/broadcast-ws-event branch November 24, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash during websocket communication when using external integrations

1 participant