summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-26 14:23:36 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-27 09:19:08 +0100
commit1c3def53c71f85bb3ae16cd4c39dbdcc2a6c460f (patch)
tree24a4aabd85d4509dbfb93c3566aa182e2b58e879
parentd6a37c23a3c4c24ce6ba925253740fae737f153e (diff)
downloadcurl-1c3def53c71f85bb3ae16cd4c39dbdcc2a6c460f.tar.gz
urldata: remove duplicate 'upkeep_interval_ms' from connectdata
... and rely only on the value already set in Curl_easy. Closes #6534
-rw-r--r--lib/http2.c2
-rw-r--r--lib/url.c3
-rw-r--r--lib/urldata.h2
3 files changed, 1 insertions, 6 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 197ba1d3c..be4c71242 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -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) {
diff --git a/lib/url.c b/lib/url.c
index cd865e6df..c02d2c201 100644
--- 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 */
diff --git a/lib/urldata.h b/lib/urldata.h
index edc237998..d7bc3d785 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -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 */