Xavier de Gaye <xdeg...@gmail.com> added the comment: Follow my comments about half_duplex_close.diff (current latest patch).
+ def handle_close(self): + if not self._closing: + self._closing = True + # try to drain the output buffer + while self.writable() and self.initiate_send() > 0: + pass + self.close() > *Any* while loop should be avoided in the dispatcher. > The risk is you keep the poller busy for more than a single loop or, > at worst, forever. Right. I will try to change that. > Also, you expect initiate_send() to return a meaningful value which > breaks compatibility with existing asynchat code overriding it. The patch changes also initiate_send() accordingly in asynchat. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com