Skip to content

Commit

Permalink
Raise exception if exec_coro is done.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshilliard authored and carltongibson committed Mar 22, 2024
1 parent 852344e commit 8769434
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions asgiref/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ async def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R:
pass
except IndexError:
pass
if exec_coro.done():
raise
if cancel_parent:
exec_coro.cancel()
ret = await exec_coro
Expand Down

0 comments on commit 8769434

Please sign in to comment.