From: Alan T. DeKok Date: Thu, 29 Jul 2021 11:22:57 +0000 (-0400) Subject: formatting, so we don't have nested "else" when they're not needed X-Git-Tag: release_3_0_24~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8822b7baea8a1e7aeb25fc0f9b5a0dbeb74ea8ac;p=thirdparty%2Ffreeradius-server.git formatting, so we don't have nested "else" when they're not needed --- diff --git a/src/main/connection.c b/src/main/connection.c index 436bea9405a..412efe1bb35 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -675,6 +675,14 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool) INFO("Need %i more connections to reach min connections (%i)", spawn, pool->min); + /* + * But if we're already at "min", then don't spawn more, + * and we don't have any extra idle connections. + */ + } else if ((pool->num + pool->pending) >= pool->min) { + spawn = 0; + extra = 0; + /* * If we're about to create more than "max", * don't create more. @@ -687,14 +695,6 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool) */ spawn = 0; - /* - * But if the pool size is already "min", we - * don't delete them. - */ - if ((pool->num + pool->pending) >= pool->min) { - extra = 0; - } - /* Otherwise, leave extra alone from above */ /*