Skip to content

Commit

Permalink
Don't raise exception in task_done when cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
torarvid committed Feb 20, 2023
1 parent 69efad5 commit fffa397
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions aiormq/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ def remover(*_: Any) -> None:
if future in self.futures:
self.futures.remove(future)

exc = future.exception()
if exc is not None:
raise exc
try:
exc = future.exception()
if exc is not None:
raise exc
except asyncio.CancelledError:
pass

return remover

Expand Down

0 comments on commit fffa397

Please sign in to comment.