mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
asyncio: Close the transport on subprocess creation failure
This commit is contained in:
parent
fcd58de78f
commit
4bf22e033e
2 changed files with 11 additions and 2 deletions
|
@ -272,7 +272,12 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
|||
transp = _WindowsSubprocessTransport(self, protocol, args, shell,
|
||||
stdin, stdout, stderr, bufsize,
|
||||
extra=extra, **kwargs)
|
||||
yield from transp._post_init()
|
||||
try:
|
||||
yield from transp._post_init()
|
||||
except:
|
||||
transp.close()
|
||||
raise
|
||||
|
||||
return transp
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue