diff options
-rw-r--r-- | Lib/asyncio/proactor_events.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index fb67155..6b5707c 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -304,9 +304,12 @@ class _ProactorWritePipeTransport(_ProactorBaseWritePipeTransport): if fut.cancelled(): # the transport has been closed return + assert fut.result() == b'' + if self._closing: + assert self._read_fut is None + return assert fut is self._read_fut, (fut, self._read_fut) self._read_fut = None - assert fut.result() == b'' if self._write_fut is not None: self._force_close(exc) else: |