summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/streams.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2019-05-14 21:39:13 (GMT)
committerGitHub <noreply@github.com>2019-05-14 21:39:13 (GMT)
commit54b74fe9df89f0e5646736f1f60376b4e37c422c (patch)
tree66a644b3c82f9b967c0e87192aca06979ef31b46 /Lib/asyncio/streams.py
parent91c99873d115b9796377d5056785f2abc987520f (diff)
downloadcpython-54b74fe9df89f0e5646736f1f60376b4e37c422c.zip
cpython-54b74fe9df89f0e5646736f1f60376b4e37c422c.tar.gz
cpython-54b74fe9df89f0e5646736f1f60376b4e37c422c.tar.bz2
bpo-36801: Temporarily fix regression in writer.drain() (#13330)
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()