cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1243 when timeout, CURLINFO_TOTAL_TIME is not ok

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Sun, 23 Jun 2013 10:00:52 +0000

No, I mean that when the timeout triggers we return a timeout error code. Not a "can't resolve" one.

The mere fact that you hit the < 1000 check means you built libcurl with the stock synchronous resolver and then it will return immediately if you set a timeout time below 1000 ms since it can't deal with a lower resolution than so. This is also why it returns immediately and it does not even try to do anything in the 80 ms you've asked for. You need to rebuild with the threaded or ares resolvers to use sub second timeout resolution for the name resolving part.

---
** [bugs:#1243] when timeout, CURLINFO_TOTAL_TIME is not ok**
**Status:** open
**Created:** Fri Jun 07, 2013 12:46 PM UTC by he qin
**Last Updated:** Sat Jun 22, 2013 04:59 PM UTC
**Owner:** Daniel Stenberg
hi
    When I use the multi handle to process one easy handle, I set 80ms timeout for the easy handle. If timeout occur, I get the CURLINFO_TOTAL_TIME, the result is 0? why not 80ms?
Read the code, I found, when timeout occur, I call 
curl_multi_socket_action(
            multi,
            CURL_SOCKET_TIMEOUT,
            0,
            &still_running);
I see that the CURLINFO_TOTAL_TIME will be update in Curl_done->Curl_pgrsDone. But , as above code, when curl_multi_socket_action was called  use CURL_SOCKET_TIMEOUT as the second arg, curl_multi_socket_action will do nothing....(in multi_socket function , all "if" is false)
If I want to get the realtime for CURLINFO_TOTAL_TIME, how to do ?
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2013-06-23

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET