Skip to content

Commit

Permalink
Fix issue with cancelled websockets that artificially cancel jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Oct 30, 2024
1 parent 8a42dde commit 5f4b8c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,8 @@ async def broadcast(message, channels):
await ws.send(my_json_dumps(message))
except (ConnectionClosed, WebsocketClosed):
dead_ws.append(ws)
except asyncio.exceptions.CancelledError as err:
api_logger.info(f"broadcast ws.send() received cancellederror {err}")

for to_remove in dead_ws:
try:
Expand Down

0 comments on commit 5f4b8c9

Please sign in to comment.