curl-library
Re: Possible bug in timeout of second request after 401
Date: Mon, 17 Feb 2014 23:37:29 +0100 (CET)
On Mon, 17 Feb 2014, Paul Medynski wrote:
> Any thoughts on this problem? Has anyone looked at the attached patch?
I'm thinking a cleaner fix would be to move the timestamping to the INIT
actions since there are multiple paths going back to CONNECT state and I don't
really like the check for zeroes like that.
How would a fix like this work for you? I haven't run the test program yet,
but I hope to convert it into a test case for the curl suite soonish.
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1024,6 +1024,7 @@ static CURLMcode multi_runsingle(struct Curl_multi
*multi,
if(CURLE_OK == data->result) {
/* after init, go CONNECT */
multistate(data, CURLM_STATE_CONNECT);
+ Curl_pgrsTime(data, TIMER_STARTSINGLE);
result = CURLM_CALL_MULTI_PERFORM;
}
break;
@@ -1035,7 +1036,6 @@ static CURLMcode multi_runsingle(struct Curl_multi
*multi,
case CURLM_STATE_CONNECT:
/* Connect. We want to get a connection identifier filled in. */
- Curl_pgrsTime(data, TIMER_STARTSINGLE);
data->result = Curl_connect(data, &data->easy_conn,
&async, &protocol_connect);
if(CURLE_NO_CONNECTION_AVAILABLE == data->result) {
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-02-17