summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-04-14 23:20:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-04-21 23:06:23 +0200
commite649432e7234dfe6905f4663bd0ce7b37ef2c5e7 (patch)
treeec343333607d509a68fa8ad74cdb9833c1f380ba /lib/setopt.c
parent060f870b85a6ee85668caeb791935fe98f4da56d (diff)
downloadcurl-e649432e7234dfe6905f4663bd0ce7b37ef2c5e7.tar.gz
CURLOPT_MAXAGE_CONN: set the maximum allowed age for conn reuse
... and disconnect too old ones instead of trying to reuse. Default max age is set to 118 seconds. Ref: #3722 Closes #3782
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index 1df38fbb4..594303eff 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -2645,6 +2645,12 @@ static CURLcode vsetopt(struct Curl_easy *data, CURLoption option,
return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.upkeep_interval_ms = arg;
break;
+ case CURLOPT_MAXAGE_CONN:
+ arg = va_arg(param, long);
+ if(arg < 0)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ data->set.maxage_conn = arg;
+ break;
case CURLOPT_TRAILERFUNCTION:
#ifndef CURL_DISABLE_HTTP
data->set.trailer_callback = va_arg(param, curl_trailer_callback);