Skip to content

Commit

Permalink
do not pop future
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 committed Aug 28, 2022
1 parent 3a9657f commit b14ab8a
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 b14ab8a

Please sign in to comment.