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] Re: #1243 when timeout, CURLINFO_TOTAL_TIME is not ok

From: he qin <hqin6_at_users.sf.net>
Date: Tue, 18 Jun 2013 04:36:07 +0000

I tried it , not ok.

I read the code, when the case(timeout) occur, the "easy->easy_conn" is NULL(because no connect in that case). so, I think should the function "Curl_pgrsUpdate" is called not in
if(easy->easy_conn &&
       (easy->state >= CURLM_STATE_CONNECT) &&
       (easy->state < CURLM_STATE_COMPLETED)) { //here }

maybe need edit some other place(set value to easy->easy_conn, otherwise no place to store the "progress.timespent") ... but I don't know where :)

---
** [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:** Mon Jun 17, 2013 09:43 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 you indicated interest in <https://sourceforge.net/p/curl/bugs/1243/>
To unsubscribe from further messages, please visit <https://sourceforge.net/auth/subscriptions/>
Received on 2013-06-18

These mail archives are generated by hypermail.

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

File upload with ASP.NET