]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urldata: remove duplicate 'upkeep_interval_ms' from connectdata
authorDaniel Stenberg <daniel@haxx.se>
Tue, 26 Jan 2021 13:23:36 +0000 (14:23 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 27 Jan 2021 08:19:08 +0000 (09:19 +0100)
... and rely only on the value already set in Curl_easy.

Closes #6534

lib/http2.c
lib/url.c
lib/urldata.h

index 197ba1d3c7d88ea12b986525ebb7b8976cb56465..be4c712420eb614c39781d8ae7255d0f31f740ea 100644 (file)
@@ -229,7 +229,7 @@ static unsigned int http2_conncheck(struct Curl_easy *data,
     struct curltime now = Curl_now();
     timediff_t elapsed = Curl_timediff(now, conn->keepalive);
 
-    if(elapsed > conn->upkeep_interval_ms) {
+    if(elapsed > data->set.upkeep_interval_ms) {
       /* Perform an HTTP/2 PING */
       rc = nghttp2_submit_ping(c->h2, 0, ZERO_NULL);
       if(!rc) {
index cd865e6df2565f096e385afc2f71a969d5d34361..c02d2c2019d7b15d700986516fb6b9fb6321bbb5 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1674,9 +1674,6 @@ static struct connectdata *allocate_conn(struct Curl_easy *data)
   /* Store current time to give a baseline to keepalive connection times. */
   conn->keepalive = Curl_now();
 
-  /* Store off the configured connection upkeep time. */
-  conn->upkeep_interval_ms = data->set.upkeep_interval_ms;
-
   conn->data = data; /* Setup the association between this connection
                         and the Curl_easy */
 
index edc23799809fad9e2023ccf57c8aee37a42bd2ec..d7bc3d785dba5694ed667c2dd912b47545c3207f 100644 (file)
@@ -1034,8 +1034,6 @@ struct connectdata {
      was used on this connection. */
   struct curltime keepalive;
 
-  long upkeep_interval_ms;      /* Time between calls for connection upkeep. */
-
   /**** curl_get() phase fields */
 
   curl_socket_t sockfd;   /* socket to read from or CURL_SOCKET_BAD */