diff options
author | twisteroid ambassador <twisteroidambassador@users.noreply.github.com> | 2018-05-28 15:16:45 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-05-28 15:16:45 (GMT) |
commit | 23f587e395e41bd5e116312b036183f42bc4159b (patch) | |
tree | 2a6453563194a9a1cba255b08a2c9a2d27810da0 /Lib/asyncio/selector_events.py | |
parent | 35230d08e09de4e2e52658d5cb09e5b0ca965418 (diff) | |
download | cpython-23f587e395e41bd5e116312b036183f42bc4159b.zip cpython-23f587e395e41bd5e116312b036183f42bc4159b.tar.gz cpython-23f587e395e41bd5e116312b036183f42bc4159b.tar.bz2 |
bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)
Fixed bug where calling write_eof() on a _SelectorSocketTransport after
it's already closed raises AttributeError.
Diffstat (limited to 'Lib/asyncio/selector_events.py')
-rw-r--r-- | Lib/asyncio/selector_events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index f9533a1..5473c70 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -899,7 +899,7 @@ class _SelectorSocketTransport(_SelectorTransport): self._sock.shutdown(socket.SHUT_WR) def write_eof(self): - if self._eof: + if self._closing or self._eof: return self._eof = True if not self._buffer: |