mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue