CURLINFO_NUM_CONNECTS: improve accuracy

The counter was not bumped in all cases correctly.

Reported-by: Marcel Raad
Ref: #5131
Closes #5135
This commit is contained in:
Daniel Stenberg 2020-03-22 11:49:16 +01:00
parent 4b355dd13b
commit 4852661426
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 1 deletions

View File

@ -807,6 +807,7 @@ static void post_SOCKS(struct connectdata *conn,
Curl_pgrsTime(conn->data, TIMER_CONNECT); /* connect done */
Curl_updateconninfo(conn, conn->sock[sockindex]);
Curl_verboseconnect(conn);
conn->data->info.numconnects++; /* to track the number of connections made */
}
/*
@ -1343,7 +1344,6 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
if(result)
return result;
data->info.numconnects++; /* to track the number of connections made */
Curl_expire(conn->data, data->set.happy_eyeballs_timeout,
EXPIRE_HAPPY_EYEBALLS);