bpo-36801: Temporarily fix regression in writer.drain() (#13330)

This commit is contained in:
Andrew Svetlov 2019-05-15 00:39:13 +03:00 committed by GitHub
parent 91c99873d1
commit 54b74fe9df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 26 deletions

View file

@ -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()