From 54b74fe9df89f0e5646736f1f60376b4e37c422c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 15 May 2019 00:39:13 +0300 Subject: bpo-36801: Temporarily fix regression in writer.drain() (#13330) --- Lib/asyncio/streams.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Lib/asyncio/streams.py') 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() -- cgit v1.2.1