Message114931
def send(self, data):
try:
result = self.socket.send(data)
return result
except socket.error, why:
if why.args[0] == EWOULDBLOCK:
return 0
elif why.args[0] in (ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED):
self.handle_close()
return 0
else:
raise
for whatever reason the connection could break client side, if you raise an anonymous exception there it's uncatchable, raise on a socket.error or dismiss async chat is a looper.
that's the main reason why everybody gets this crazy infinite loop on for instance broken pipe error and the thing never exit, you just raise on your-self other and other again,
BTW, you could have the same issue whatever the language, this is a developer bug. |
|
Date |
User |
Action |
Args |
2010-08-25 19:41:33 | mmw | set | recipients:
+ mmw |
2010-08-25 19:41:33 | mmw | set | messageid: <1282765293.84.0.0540536111672.issue9686@psf.upfronthosting.co.za> |
2010-08-25 19:41:32 | mmw | link | issue9686 messages |
2010-08-25 19:41:31 | mmw | create | |
|