Skip to content

Commit

Permalink
Handle CancelledError in async pubsub managers (Fixes #750)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jul 13, 2021
1 parent fb3ac95 commit a813bde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/socketio/asyncio_pubsub_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import asyncio
from functools import partial
import uuid

Expand Down Expand Up @@ -148,6 +149,8 @@ async def _thread(self):
while True:
try:
message = await self._listen()
except asyncio.CancelledError: # pragma: no cover
break
except:
import traceback
traceback.print_exc()
Expand Down

0 comments on commit a813bde

Please sign in to comment.