You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gev...@googlegroups.com
hi, I am trying to write a server by gevent, and I found that sometimes my server can not got the connection lost signal when client close the connection. this is my code and anyone can help me find out where is the problem?
server runs on Linux, but develop on windows.
def _listener(self, sock):
while True:
# gevent will raise a error when connection lost at windows, so use "try"
try:
data = sock.recv(1024)
except socket.error, e:
break
if not data:
break
self._localServer.lostConnect(self)
Executier Godlike
unread,
Apr 27, 2012, 12:11:57 PM4/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gev...@googlegroups.com, sle...@gmail.com
May be in this moment recv() returns empty data?
It's the usual approach for socket to indicate closed connections.
cat street
unread,
Apr 27, 2012, 9:04:24 PM4/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message