Skip to content

Commit 598568c

Browse files
rettiermiguelgrinberg
authored andcommitted
assigning local ret variable to none if the asyncio task is canceled (miguelgrinberg#164)
1 parent af13ef0 commit 598568c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

socketio/asyncio_namespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async def trigger_event(self, event, *args):
3636
try:
3737
ret = await handler(*args)
3838
except asyncio.CancelledError: # pragma: no cover
39-
pass
39+
ret = None
4040
else:
4141
ret = handler(*args)
4242
return ret

0 commit comments

Comments
 (0)