From: Daniel Stenberg Date: Mon, 1 Jun 2026 14:01:17 +0000 (+0200) Subject: setopt: CURLOPT_MAXCONNECTS set to 0 restores default value X-Git-Tag: rc-8_21_0-2~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c53426231daf6acf5fcc4292fbff024082fd9934;p=thirdparty%2Fcurl.git setopt: CURLOPT_MAXCONNECTS set to 0 restores default value Closes #21829 --- diff --git a/lib/setopt.c b/lib/setopt.c index 07fa60be7e..d4c1ca69a4 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -847,9 +847,9 @@ static CURLcode setopt_long_net(struct Curl_easy *data, CURLoption option, s->dns_cache_timeout_ms = -1; break; case CURLOPT_MAXCONNECTS: - result = value_range(&arg, 1, 1, INT_MAX); + result = value_range(&arg, 0, 0, INT_MAX); if(!result) - s->maxconnects = (uint32_t)arg; + s->maxconnects = arg ? (uint32_t)arg : DEFAULT_CONNCACHE_SIZE; break; case CURLOPT_SERVER_RESPONSE_TIMEOUT: return setopt_set_timeout_sec(&s->server_response_timeout, arg);