summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/streams.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/streams.py')
-rw-r--r--Lib/asyncio/streams.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py
index 146a338..2f0cbfd 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()