summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-02-17 23:43:31 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-03-03 16:35:04 +0100
commit0b3750b5c23c25f1bcf4ed95edf8928ce4fd06cc (patch)
treed1d8ff35b7fa0049294c8ee3ad9b76e6a6a3d314
parenta21c04f391b69d4540f613bf696cf773fd159a64 (diff)
downloadgnurl-0b3750b5c23c25f1bcf4ed95edf8928ce4fd06cc.tar.gz
gnurl-0b3750b5c23c25f1bcf4ed95edf8928ce4fd06cc.tar.bz2
gnurl-0b3750b5c23c25f1bcf4ed95edf8928ce4fd06cc.zip
multi_runsingle: move timestamp into INIT
Setting the TIMER_STARTSINGLE timestamp first in CONNECT has the drawback that for actions that go back to the CONNECT state, the time stamp is reset and for the multi_socket API there's no corresponding Curl_expire() then so the timeout logic gets wrong! Reported-by: Brad Spencer Bug: http://curl.haxx.se/mail/lib-2014-02/0036.html
-rw-r--r--lib/multi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 4a0374971..bc69996e6 100644
--- 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) {