aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-22 11:49:16 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-22 23:31:36 +0100
commit48526614267ce6c3262174fc1b4bb45cc94ee4eb (patch)
tree326493e1c0c6d4a1e22391811e95b70446beb91c /lib
parent4b355dd13b29eb8ef93d20c60b418004d8b8d6b1 (diff)
CURLINFO_NUM_CONNECTS: improve accuracy
The counter was not bumped in all cases correctly. Reported-by: Marcel Raad Ref: #5131 Closes #5135
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 5e631baa9..8cfdbf3af 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -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);