apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick" <traw...@gmail.com>
Subject Re: apr_socket_connect
Date Wed, 12 Apr 2006 10:49:29 GMT
On 4/12/06, Jakob Praher <jakob.praher@dynatrace.com> wrote:
> hi all,
> apparently I have a strange problem with apr_socket_connect, when
> calling it several times within a short time period, it turns out to
> return APR_SCUCESS without actually succeeded in connect( )ing!

What socket options have you set on the socket?  timeout or just non-blocking?

If you set it to non-blocking, did you wait for the APR_POLLOUT
condition with apr_poll() on the socket before calling
apr_socket_connect again?  I think the error from getsockopt() is
reset once it is retrieved the first time.  That may be the issue
triggered with calling apr_socket_connect() multiple times.

I wouldn't suspect a bug in the kernel for this, or many applications
would fail.

View raw message