Skip to content

Commit

Permalink
Merge pull request #524 from torarvid/torarvid/prevent-task-exception
Browse files Browse the repository at this point in the history
Prevent 'Task exception was never retrieved'
  • Loading branch information
mosquito committed Feb 20, 2023
2 parents 05b7cfd + a6ce88e commit 4fa1f9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aio_pika/tools.py
Expand Up @@ -38,10 +38,12 @@ def iscoroutinepartial(fn: Callable[..., Any]) -> bool:


def _task_done(future: asyncio.Future) -> None:
if not future.cancelled():
try:
exc = future.exception()
if exc is not None:
raise exc
except asyncio.CancelledError:
pass


def create_task(
Expand Down

0 comments on commit 4fa1f9d

Please sign in to comment.