Drop the unreachable branch in the live socket loop

`asyncio.wait(..., FIRST_COMPLETED)` returns with at least one of the two
tasks done, so `receiver` missing from `done` already means `sender` is in
it. The `elif sender not in done: continue` could never fire.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CL9zvnnvcp1mvA8o7impxk
This commit is contained in:
2026-09-06 18:16:09 +02:00
co-authored by Claude Opus 5
parent c6cec9e848
commit 794b296fc1
+2 -2
View File
@@ -1076,8 +1076,8 @@ async def flow_events(websocket: WebSocket, token: str = "") -> None:
receiver = asyncio.create_task(websocket.receive_text()) receiver = asyncio.create_task(websocket.receive_text())
if sender not in done: if sender not in done:
continue continue
elif sender not in done: # `sender` is done from here: `FIRST_COMPLETED` returns with at
continue # least one of the two, so `receiver` missing means this one is.
# Everything the bus has right now, not just the one event # Everything the bus has right now, not just the one event
# that woke this: a cascade puts a dozen in at once, and one # that woke this: a cascade puts a dozen in at once, and one