Georgey added the comment:
Not only does the getpeername() method not work, but the socket instance itself
has been destroyed as garbage by python.
- I understand the former, but cannot accept the latter.
--
resolution: not a bug -> wont fix
status: closed -> p
Georgey added the comment:
Hello David,
Yes I had the same thought with you that the information of socket is lost
at operating syetem level.
However, I hope at Python level this kind of information will not be lost.
Once the socket has been created by incoming connection, the
Georgey added the comment:
The socket close accident is not caused by queue or calling handle_sock_error
at all, it happened right after select error
After changing the Exception handling of main Thread:
except Exception as err:
print("
Georgey added the comment:
I have changed the code to report any error that occurs in receiving message,
and it reports: [WinError10054] An existing connection was forcibly closed by
the remote host
Well, this error is the one we need to handle, right? A server need to deal
with abrupt
Georgey added the comment:
so when do you think the error socket closes?
--
___
Python tracker
<http://bugs.python.org/issue28447>
___
___
Python-bugs-list mailin
Georgey added the comment:
As your request, I simplify the server here:
--
import socket
import select, time
import queue, threading
ISOTIMEFORMAT = '%Y-%m-%d %X'
BUFSIZ = 2048
TIMEOUT = 10
ADDR = ('', 15625)
SEG = &q
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)
pr
Georgey added the comment:
"Without code or something demonstrating the bug, I’m pretty sure it is a bug
in your program"
Here is the main Thread
---
mailbox = queue.Queue()
while True:
#print(addr_groups)
unknown_clients=[]
for key in yellow
Georgey added the comment:
I have changed my Username, thanks martin.
" But it sounds like you may be closing the socket in one thread, and trying to
use it in another thread"
-- I do not attempt to "close" it in main thread. Main only detect the
connection failure a