From 6be96d36f59b2a3801d7c5cd725ffac775917d55 Mon Sep 17 00:00:00 2001 From: Alan Buxey Date: Mon, 21 Nov 2016 15:25:24 +0000 Subject: [PATCH] remove unnecessary "Need 0 more connections to reach..." INFO output 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/connection.c b/src/main/connection.c index d953dd9db9b..3f1945ecb7a 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -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" -- 2.47.3