[issue28447] socket.getpeername() failure on broken TCP/IP connection
Georgey
report at bugs.python.org
Sun Oct 16 23:31:02 EDT 2016
Georgey added the comment:
Yes that is definitely a closed socket. But it is strange that in a single thread server without select module, the socket is never closed until I explicitly use close() method.
------------
except:
print(sock) #<- here it looks normal
time.sleep(3)
print(sock) #<- here it still looks normal
sock.close()
print(sock) #<- finally the [closed] tag appears and all the details lost
============
So I guess the "Socket Automatically Closing" effect associate with "select" module? For when I run the single-thread server in the IDLE and called time.sleep(), it has been already treated as multi-thread.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28447>
_______________________________________
More information about the Python-bugs-list
mailing list