From: Stephan Bosch Date: Wed, 12 Aug 2020 20:24:22 +0000 (+0200) Subject: lib-http: http-client-connection - Explicitly handle an infinite connection limit... X-Git-Tag: 2.3.13~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e849b84ac70e86caa5cb0edb8589444fbeab5b8;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http-client-connection - Explicitly handle an infinite connection limit for setting idle timeout. This can just use the maximum idle timeout directly. --- diff --git a/src/lib-http/http-client-connection.c b/src/lib-http/http-client-connection.c index 44e7fb4a99..1a51049546 100644 --- a/src/lib-http/http-client-connection.c +++ b/src/lib-http/http-client-connection.c @@ -444,8 +444,9 @@ http_client_connection_start_idle_timeout(struct http_client_connection *conn) i_assert(max > 0); /* Set timeout for this connection */ - if (idle_count == 0) { - /* No idle connections yet; use the maximum idle time. */ + if (idle_count == 0 || max == UINT_MAX) { + /* No idle connections yet or infinite connections allowed; + use the maximum idle time. */ timeout = set->max_idle_time_msecs; } else if (count > max || idle_count >= max) { /* Instant death for (urgent) connections above limit */