← Commit list

c53426231d

Daniel Stenberg
Daniel Stenberg
2026-06-01
SUCCESS Duration: 256s

Subject

setopt: CURLOPT_MAXCONNECTS set to 0 restores default value

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/setopt.c+2 -2
@@ -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);