Skip to content

Commit

Permalink
do not pop future
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 authored Aug 1, 2022
1 parent f6ede6e commit 03c0e87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Lib/asyncio/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def resume_writing(self):
if self._loop.get_debug():
logger.debug("%r resumes writing", self)

while self._drain_waiters:
waiter = self._drain_waiters.popleft()
for waiter in self._drain_waiters:
if not waiter.done():
waiter.set_result(None)

Expand All @@ -155,8 +154,7 @@ def connection_lost(self, exc):
if not self._paused:
return

while self._drain_waiters:
waiter = self._drain_waiters.popleft()
for waiter in self._drain_waiters:
if not waiter.done():
if exc is None:
waiter.set_result(None)
Expand Down

0 comments on commit 03c0e87

Please sign in to comment.