1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Peter Kovacs provided a patch that makes the CURLINFO_CONNECT_TIME work fine

when using the multi interface (too).
This commit is contained in:
Daniel Stenberg 2003-04-29 18:03:30 +00:00
parent 63593f5597
commit 2f9cabc30b

View File

@ -38,6 +38,7 @@
#include "transfer.h" #include "transfer.h"
#include "url.h" #include "url.h"
#include "connect.h" #include "connect.h"
#include "progress.h"
/* The last #include file should be: */ /* The last #include file should be: */
#ifdef MALLOCDEBUG #ifdef MALLOCDEBUG
@ -328,6 +329,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
} }
/* Connect. We get a connection identifier filled in. */ /* Connect. We get a connection identifier filled in. */
Curl_pgrsTime(easy->easy_handle, TIMER_STARTSINGLE);
easy->result = Curl_connect(easy->easy_handle, &easy->easy_conn); easy->result = Curl_connect(easy->easy_handle, &easy->easy_conn);
/* after the connect has been sent off, go WAITCONNECT */ /* after the connect has been sent off, go WAITCONNECT */
@ -468,11 +470,12 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
} }
if(CURLM_STATE_COMPLETED != easy->state) { if(CURLM_STATE_COMPLETED != easy->state) {
if(CURLE_OK != easy->result) if(CURLE_OK != easy->result) {
/* /*
* If an error was returned, and we aren't in completed state now, * If an error was returned, and we aren't in completed state now,
* then we go to completed and consider this transfer aborted. */ * then we go to completed and consider this transfer aborted. */
easy->state = CURLM_STATE_COMPLETED; easy->state = CURLM_STATE_COMPLETED;
}
else else
/* this one still lives! */ /* this one still lives! */
(*running_handles)++; (*running_handles)++;