Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm authored Jan 4, 2025
1 parent 9892750 commit 99dd7ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/anyio/_backends/_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ async def __aexit__(
while self._tasks:
if self._on_completed_fut is None:
self._on_completed_fut = loop.create_future()

try:
await self._on_completed_fut
except CancelledError as exc:
Expand All @@ -755,6 +756,7 @@ async def __aexit__(
and not is_anyio_cancellation(exc)
):
exc_val = exc

self._on_completed_fut = None
else:
# If there are no child tasks to wait on, run at least one checkpoint
Expand Down

0 comments on commit 99dd7ef

Please sign in to comment.