]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove unnecessary "Need 0 more connections to reach..." INFO output
authorAlan T. DeKok <aland@freeradius.org>
Mon, 21 Nov 2016 16:44:40 +0000 (11:44 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 21 Nov 2016 16:44:40 +0000 (11:44 -0500)
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.

Manual merge of 6be96d36

src/main/connection.c

index e2141572713cbbf43741ff755ab80baee41a298e..38367ee38f13f775d6307658474d5e723a3343aa 100644 (file)
@@ -676,7 +676,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request
         *      have fewer than "min".  When that happens, open more
         *      connections to enforce "min".
         */
-       if ((pool->state.num + pool->state.pending) <= pool->min) {
+       if ((pool->state.num + pool->state.pending) < pool->min) {
                spawn = pool->min - (pool->state.num + pool->state.pending);
                extra = 0;
 
@@ -701,7 +701,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request
         *      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"