mirror of https://github.com/python/cpython
GH-88050: fix race in closing subprocess pipe in asyncio (#97951)
Check for None when iterating over `self._pipes.values()`.
This commit is contained in:
parent
f612565bd3
commit
e2e6b95c03
|
@ -216,7 +216,9 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
|
|||
self._proc.returncode = returncode
|
||||
self._call(self._protocol.process_exited)
|
||||
for p in self._pipes.values():
|
||||
p.pipe.close()
|
||||
if p is not None:
|
||||
p.pipe.close()
|
||||
|
||||
self._try_finish()
|
||||
|
||||
async def _wait(self):
|
||||
|
|
Loading…
Reference in New Issue