curl-library
Re: curl timeout behavior in ulti-threaded programs
Date: Tue, 16 Oct 2001 14:08:59 +0200 (MET DST)
On Tue, 16 Oct 2001, Bescon, Guenole wrote:
> As the CURL_CONNECTIMEOUT and CURL_TIMEOUT options are not recommended in
> multi-threaded programs due to the sending of the SIGALRM signal, is curl
> hanging during the connection phase if a system call is blocked
Yes and no. Yes, in 7.9 it blocks on both the name resolver gethostbyname_r()
as well as the connect() call.
In pre-releases of 7.9.1, it blocks only on the gethostbyname_r() function.
> and/or curl is hanging during the transfer phase if the server does not
> respond ?
It never blocks in the transfer phase. However, if no timeout is set, it'll
not timeout from a transfer that is alive but that never seems to end.
> How may I plan the curl behavior in multi-threaded programs ?
We might have a need for a timeout that isn't signal based, but that allows
to timeout very slow/idle/stalled transfers.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-10-16