]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove unnecessary "Need 0 more connections to reach..." INFO output 1853/head
authorAlan Buxey <alan.buxey@gmail.com>
Mon, 21 Nov 2016 15:25:24 +0000 (15:25 +0000)
committerGitHub <noreply@github.com>
Mon, 21 Nov 2016 15:25:24 +0000 (15:25 +0000)
the <= means that when the value is 0 the server keeps spewing out "Need 0 more connections to reach..." messages into the log output.  this ensures messages come out only when there is a need.

src/main/connection.c

index d953dd9db9b35a800abf8037397b11362ced5bb8..3f1945ecb7a3ec273be3ebab4d972e64bda2f7a8 100644 (file)
@@ -643,7 +643,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool)
         *      have fewer than "min".  When that happens, open more
         *      connections to enforce "min".
         */
-       if ((pool->num + pool->pending) <= pool->min) {
+       if ((pool->num + pool->pending) < pool->min) {
                spawn = pool->min - (pool->num + pool->pending);
                extra = 0;
 
@@ -668,7 +668,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool)
         *      AND we don't have enough idle connections.
         *      Open some more.
         */
-       } else if (idle <= pool->spare) {
+       } else if (idle < pool->spare) {
                /*
                 *      Not enough spare connections.  Spawn a few.
                 *      But cap the pool size at "max"