apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bar...@veribox.net
Subject Re: [PATCH] sockets.c
Date Mon, 06 Aug 2001 23:58:56 GMT
apr_connect() is returning EISCONN instead of APR_SUCCESS
on a FreeBSD 4.2 machine.

barbee.

On 06 Aug 2001 17:48:21 -0400 Jeff Trawick <trawick@attglobal.net>
allegedly said:
> Ryan Bloom <rbb@covalent.net> writes:
> 
> > The problem is that the second connect() call is failing with
an EALREADYCONNECTED.
> > The correct way to detect an error from connect, according to
Single Unix, is to do a poll
> > or select.  If select/poll return with an error or they timeout,
the connect failed.  If they return
> > successfully, then the connect has succeeded.
> 
> On what platform is it failing with EALREADYCONNECTED?  I can't
> readily reproduce this problem.  (not disagreeing, just would like
to
> play with it myself)
> 
> A patch to look for an error in a different manner must retrieve
the
> saved error from TCP.  You gotta get the ECONNREFUSED or ENETUNREACH
> back to the app.
> 
> (Actually, when I did this code I did look around for examples.
> I guess I looked at a bad one :) ) 
> 
> By the way...  Stevens doesn't check for exception on the socket,
just
> readability and writability, then he calls getsockopt(,SOL_SOCKET,
> SO_ERROR,) to retrieve the saved error from TCP.)
> 
> -- 
> Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
>        http://www.geocities.com/SiliconValley/Park/9289/
>              Born in Roswell... married an alien...
> 

Mime
View raw message