[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

Josiah Carlson report at bugs.python.org
Tue Jul 28 22:23:34 CEST 2009


Josiah Carlson <josiahcarlson at users.sourceforge.net> added the comment:

Firstly, it expects that handle_expt_event() is for handling exceptional 
conditions.  This is not the case.  handle_expt_event() is meant for 
handling "OOB" or "priority" data coming across a socket.  FTP and some 
other protocols use this.  I forgot to fix it earlier, which is why it's 
making it into this patch.

Secondly, I pulled the part that was inside handle_expt_event() that was 
being used to find the exception and pulls it out into _exception(), 
removing the previous behavior (wrt to the broken API), and replacing it 
with something that is cleaner and more correct (assuming sockets).

To respond to it being an issue that the object has a socket with a 
getsockopt(), I can fix it to handle the AttributeError case.

Would you be willing to try this out given my explanation as to why I 
changed your patch?

----------
Added file: http://bugs.python.org/file14585/asyncore_fix_refused-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6550>
_______________________________________


More information about the Python-bugs-list mailing list