From e4b93d0ebb3c4ee3b1a630a53184b621859b007a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:23:16 +0000 Subject: [PATCH 1/2] Initial plan From d16c0af6345769489c065cb71c2209018b50d4e2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 11:26:21 +0000 Subject: [PATCH 2/2] Fix broadcast_json to handle per-connection send failures Co-authored-by: JohnCHarrington <1857365+JohnCHarrington@users.noreply.github.com> --- python/src/open_echo/web.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/src/open_echo/web.py b/python/src/open_echo/web.py index 921fc89..8714e37 100644 --- a/python/src/open_echo/web.py +++ b/python/src/open_echo/web.py @@ -29,8 +29,12 @@ async def disconnect(self, websocket: WebSocket) -> None: self.active_connections.remove(websocket) async def broadcast_json(self, data) -> None: - for connection in self.active_connections: - await connection.send_json(data) + for connection in list(self.active_connections): + try: + await connection.send_json(data) + except Exception as e: + log.warning(f"WebSocket send failed, disconnecting client: {e}") + await self.disconnect(connection) class EchoReader: