Kaydet (Commit) 7d78d0d9 authored tarafından Victor Stinner's avatar Victor Stinner

Merge 3.4 (asyncio)

......@@ -417,6 +417,7 @@ class SSLProtocol(protocols.Protocol):
self._session_established = False
self._in_handshake = False
self._in_shutdown = False
self._transport = None
def connection_made(self, transport):
"""Called when the low-level connection is made.
......
......@@ -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():
......
......@@ -516,7 +516,7 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
self._loop.call_soon(self._call_connection_lost, None)
def close(self):
if not self._closing:
if self._pipe is not None and not self._closing:
# write_eof is all what we needed to close the write pipe
self.write_eof()
......
......@@ -590,6 +590,7 @@ class BaseEventLoopTests(test_utils.TestCase):
raise ValueError('spam')
loop = Loop()
self.addCleanup(loop.close)
asyncio.set_event_loop(loop)
def run_loop():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment