From: Arran Cudbard-Bell Date: Mon, 7 Nov 2016 18:32:29 +0000 (-0500) Subject: Sometimes we're spawning to reach min not spare X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd62fe7022bc5d3ad45bd895379f2edafef60e76;p=thirdparty%2Ffreeradius-server.git Sometimes we're spawning to reach min not spare --- diff --git a/src/main/connection.c b/src/main/connection.c index 3b6d5173ebd..e2141572713 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -680,6 +680,8 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request spawn = pool->min - (pool->state.num + pool->state.pending); extra = 0; + ROPTIONAL(RINFO, INFO, "Need %i more connections to reach min connections (%i)", spawn, pool->min); + /* * If we're about to create more than "max", * don't create more. @@ -711,6 +713,8 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request spawn = pool->max - (pool->state.num + pool->state.pending); } + ROPTIONAL(RINFO, INFO, "Need %i more connections to reach %i spares", spawn, pool->spare); + /* * min < num < max * @@ -745,7 +749,6 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request * a connection. Avoids spurious log messages. */ if (spawn) { - ROPTIONAL(RINFO, INFO, "Need %i more connections to reach %i spares", spawn, pool->spare); pthread_mutex_unlock(&pool->mutex); (void) fr_connection_spawn(pool, request, now, false, true); pthread_mutex_lock(&pool->mutex);