diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-03-22 11:49:16 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-22 11:50:39 +0100 |
commit | 8aa36b6965cbd7b6d6d385dedd28d5b227ff5ebd (patch) | |
tree | efa334b31b09c9803668caf6a3a0d45dcda9c4c6 | |
parent | 21b3893a119965dd1950203efb933d9567c4f67b (diff) | |
download | curl-8aa36b6965cbd7b6d6d385dedd28d5b227ff5ebd.tar.gz |
CURLINFO_NUM_CONNECTS: improve accuracybagder/fix-num-connects
The counter was not bumped in all cases correctly.
Reported-by: Marcel Raad
Ref: #5131
-rw-r--r-- | lib/connect.c | 2 |
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); |