From 7d8fe6456a975e6fc2e6b7bf808747ef0ba76a6e Mon Sep 17 00:00:00 2001 From: stroblme Date: Sun, 6 Sep 2026 18:16:09 +0200 Subject: [PATCH] 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. --- backend/fluksio/api/routes/flows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/fluksio/api/routes/flows.py b/backend/fluksio/api/routes/flows.py index 9c4a9ae..c737b17 100644 --- a/backend/fluksio/api/routes/flows.py +++ b/backend/fluksio/api/routes/flows.py @@ -1076,8 +1076,8 @@ async def flow_events(websocket: WebSocket, token: str = "") -> None: receiver = asyncio.create_task(websocket.receive_text()) if sender not in done: continue - elif sender not in done: - continue + # `sender` is done from here: `FIRST_COMPLETED` returns with at + # least one of the two, so `receiver` missing means this one is. # Everything the bus has right now, not just the one event # that woke this: a cascade puts a dozen in at once, and one