Skip to content

Commit b32bbf9

Browse files
committed
Remove stray debug var
1 parent 17e4c9e commit b32bbf9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Lib/asyncio/timeouts.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ async def __aexit__(
9090

9191
if self._state is _State.CANCELLING:
9292
self._state = _State.CANCELLED
93-
counter = _COUNTERS[self._task]
94-
if counter == 1:
95-
raise TimeoutError
96-
else:
97-
_COUNTERS[self._task] = counter - 1
93+
94+
if self._task.uncancel() == 0:
95+
# Since there are no outstanding cancel requests, we're
96+
# handling this.
97+
return True
9898
elif self._state is _State.ENTERED:
9999
self._state = _State.EXITED
100100

0 commit comments

Comments
 (0)