From 41ed958ee6f0ff15836e11013d1cada8c3ae90fc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 15 Jan 2015 13:16:50 +0100 Subject: Issue #23243: Fix asyncio._UnixWritePipeTransport.close() Do nothing if the transport is already closed. Before it was not possible to close the transport twice. --- Lib/asyncio/unix_events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/asyncio/unix_events.py') diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py index 14b48438ac9..9f4005cb13a 100644 --- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -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() -- cgit v1.2.3