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 committed Mar 21, 2024
1 parent 852344e commit 0429ebc
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 0429ebc

Please sign in to comment.