mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:33:31 +03:00
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
This commit is contained in:
parent
060f870b85
commit
e649432e72
10 changed files with 106 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue