mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
asyncio: Fix _ProactorWritePipeTransport._pipe_closed()
Do nothing if the pipe is already closed. _loop_writing() may call _force_close() when it gets ConnectionResetError.
This commit is contained in:
parent
1703bbbf89
commit
83bdfa08f7
1 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue