diff options
Diffstat (limited to 'Lib/asyncio/streams.py')
-rw-r--r-- | Lib/asyncio/streams.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 146a33818d..2f0cbfdbe8 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -439,9 +439,7 @@ class StreamWriter: # Wait for protocol.connection_lost() call # Raise connection closing error if any, # ConnectionResetError otherwise - fut = self._protocol._get_close_waiter(self) - await fut - raise ConnectionResetError('Connection lost') + await sleep(0) await self._protocol._drain_helper() |