diff options
-rw-r--r-- | Lib/asyncio/subprocess.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/asyncio/subprocess.py b/Lib/asyncio/subprocess.py index a028339..c848a21 100644 --- a/Lib/asyncio/subprocess.py +++ b/Lib/asyncio/subprocess.py @@ -94,8 +94,11 @@ class SubprocessStreamProtocol(streams.FlowControlMixin, reader.set_exception(exc) def process_exited(self): - # wake up futures waiting for wait() returncode = self._transport.get_returncode() + self._transport.close() + self._transport = None + + # wake up futures waiting for wait() while self._waiters: waiter = self._waiters.popleft() if not waiter.cancelled(): |