curl-users
Re: connect-timeout not working
Date: Fri, 4 Jan 2002 15:55:26 +0100
On Fri, Jan 04, 2002 at 12:46:31PM +0100, Daniel Stenberg wrote:
> On Fri, 4 Jan 2002, Georg Horn wrote:
>
> > After looking over it again, i think that it hangs somewhere during the
> > SSL- handshake, because i get error messages like this:
> >
> > curl: (35) SSL: error:00000000::lib(0) :func(0) :reason(0)
> >
> > So the connect() seems to work fine, but it hangs somewhere in the SSL-lib
> > and never returns. Any idea, how to solve this?
>
> Uh. Not right now (need to study related OpenSSL stuff first). Can you make
> sure that this is really the case?
Yes, i think sometimes it happens that the signal interrupts us just
during ssl-stuff. I can reproduce that by specifying a short timeout of
one second (the "alarmfunc called" was added by me):
> curl -v --connect-timeout 1 https://meine.db24.de
alarmfunc called
* Closing connection #0
curl: (35) SSL: error:00000000::lib(0) :func(0) :reason(0)
> > Do the ssl-functions have an option to set a timeout, or should we turn off
> > signals after the dnslookup, and turn them on again before doing the ssl
> > stuff?
>
> Using signals is not a good solution. Using non-blocking sockets might be
> better, as then OpenSSL shouldn't be able to hang either.
Yes, that could be a solution. I'll try to play around with this a little
bit...
Bye,
Georg
Received on 2002-01-04