mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] GH-88050: fix race in closing subprocess pipe in asyncio (GH-97951) (#97978)
Check for None when iterating over `self._pipes.values()`.
(cherry picked from commit e2e6b95c03
)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
This commit is contained in:
parent
1cd19f7ebf
commit
bd3dcb3549
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