New submission from mmw <0xcafef...@gmail.com>: 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. ---------- components: Library (Lib) messages: 114931 nosy: mmw priority: normal severity: normal status: open title: asyncore infinite loop on raise versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9686> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com