diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-15 12:54:49 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-15 12:54:49 +0100 |
commit | 1acecaf9ed3ad034135ba55ee886f77cdc741f88 (patch) | |
tree | 39bca053025927f50c954789e15622ed28cf3757 /asyncio | |
parent | 798f8fa56afad67358946e7ff1ec005050c146fb (diff) | |
download | trollius-1acecaf9ed3ad034135ba55ee886f77cdc741f88.tar.gz |
Python issue #23243: Fix _UnixWritePipeTransport.close()
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
Diffstat (limited to 'asyncio')
-rw-r--r-- | asyncio/unix_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/asyncio/unix_events.py b/asyncio/unix_events.py index 14b4843..9f4005c 100644 --- a/asyncio/unix_events.py +++ b/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() |