mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +00:00
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.
This commit is contained in:
parent
35230d08e0
commit
23f587e395
3 changed files with 9 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue