[New-bugs-announce] [issue2944] asyncore doesn't handle connection refused correctly

Alexander Shigin report at bugs.python.org
Thu May 22 15:24:01 CEST 2008

New submission from Alexander Shigin <shigin at rambler-co.ru>:

Unix select returns socket in read fd set and write fd set if 
nonblocking socket attempts to connect to unaviable address. 

asyncore should check this case by calling getsockopt with SO_ERROR 
optname. If return value is 0 it should call handle_connect_event, 
otherwise if should call handle_expt_event.

Attached file prints "get exception" if asyncore can't connect to 
remote side, not "uncaptured python exception"

Patches from Issue1736190 do not fix this case.

components: Library (Lib)
files: test_async_connect.py
messages: 67188
nosy: shigin
severity: normal
status: open
title: asyncore doesn't handle connection refused correctly
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file10400/test_async_connect.py

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list