Skip to content
Permalink
Browse files

CURLINFO_NUM_CONNECTS: improve accuracy

The counter was not bumped in all cases correctly.

Reported-by: Marcel Raad
Ref: #5131
Closes #5135
  • Loading branch information
bagder committed Mar 22, 2020
1 parent 4b355dd commit 48526614267ce6c3262174fc1b4bb45cc94ee4eb
Showing with 1 addition and 1 deletion.
  1. +1 −1 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);

0 comments on commit 4852661

Please sign in to comment.
You can’t perform that action at this time.