From: Alan T. DeKok Date: Thu, 29 Jul 2021 10:59:49 +0000 (-0400) Subject: formatting, and make it more consistent X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeccdfc9324851c6f8a69dc06ceef106f3dd2961;p=thirdparty%2Ffreeradius-server.git formatting, and make it more consistent --- diff --git a/src/lib/server/pool.c b/src/lib/server/pool.c index a953d1803ee..c828724b2fe 100644 --- a/src/lib/server/pool.c +++ b/src/lib/server/pool.c @@ -675,6 +675,14 @@ static int connection_check(fr_pool_t *pool, request_t *request) ROPTIONAL(RINFO, 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. @@ -686,13 +694,7 @@ static int connection_check(fr_pool_t *pool, request_t *request) * delete all of them. */ spawn = 0; - /* - * But if the pool size is already "min", we - * don't delete them. - */ - if ((pool->state.num + pool->state.pending) == pool->min) { - extra = 0; - } + /* Otherwise, leave extra alone from above */ /*