summaryrefslogtreecommitdiff
path: root/asyncio/unix_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'asyncio/unix_events.py')
-rw-r--r--asyncio/unix_events.py2
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()