handle_connect called when connection fails

Mike Clarkson support@i...
Sat, 09 Dec 2000 23:25:33 -0000


--- In medusa@egroups.com, ebnf@h... wrote:
> The following code tries to connect to a port that no one is 
listening
> to - the problem is that handle_connect is called anyway. Is there
> anyway I can find out whether the connection failed without trying 
to
> write or read (which I imagined would fail).

This also affects http_proxy.py: if you proxy request a port
that no one is listening to then the exception after this 
handle_connect is unhandled, and the client will wait forever.

Any fixes? Many thanks in advance,

Mike.