]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Sometimes we're spawning to reach min not spare
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 7 Nov 2016 18:32:29 +0000 (13:32 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 7 Nov 2016 18:35:03 +0000 (13:35 -0500)
src/main/connection.c

index 3b6d5173ebdbde4ee56d47a00086202d507173a4..e2141572713cbbf43741ff755ab80baee41a298e 100644 (file)
@@ -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);