From 1c3def53c71f85bb3ae16cd4c39dbdcc2a6c460f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 26 Jan 2021 14:23:36 +0100 Subject: urldata: remove duplicate 'upkeep_interval_ms' from connectdata ... and rely only on the value already set in Curl_easy. Closes #6534 --- lib/http2.c | 2 +- lib/url.c | 3 --- lib/urldata.h | 2 -- 3 files changed, 1 insertion(+), 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 */ -- cgit v1.2.1