cURL / Mailing Lists / curl-library / Single Mail


RE: Timeout problem using libcurl 7.19.3 to send file from windows

From: Daniel Stenberg <>
Date: Mon, 30 May 2011 22:50:54 +0200 (CEST)

On Mon, 30 May 2011, Peppicelli, Daniel wrote:

> - Unfortunately, we are using this old version because we have a product
> running on several platform (windows, Windows Intime Kernel and QNX).
> libcurl is embedded in the latest version of QNX. Unfortunately, the folks
> at QNX did not use the latest version but rather the 7.19.3. I'll ask them
> for a new version or I'll compile it myself just to try.

Right, it might be worth first just trying the latest version out to see if it
makes anything better as if it does you probably can figure out the particular
change in case you can't just update.

> - I'm saying that it takes ~2.5 [s] to transfer a file of < 10k. Inside
> these two seconds, we "lose" 2 seconds inside the select() call in
> Curl_socket_ready() function. Those two seconds comes for two timeouts by
> the select() call

Ok, but the crucial question then becomes: why does select() "lose" this time?

select() is made to return immediately as there's anything to read (or write,
depending on how it gets invoked) on the socket so why would libcurl call
select() on a socket that can be used almost at once and then just sit there
and timeout?

> I did figure it out with this modified version of Curl_socket_ready()
> in select.c:

I checked, but I can't find any changes done to select.c in a really long time
(that seemed relevant to this).

> I did write to this mailing list in order to know if some folks did
> encounter the same issue. If not, I'll try to go ahead in debugging and
> understanding the reason of the timeouts in select() calls.

I've not seen it myself and I've not seen anyone else report it before.

List admin:
Received on 2011-05-30