From: Alan T. DeKok Date: Thu, 6 Nov 2014 16:06:15 +0000 (-0500) Subject: Fix initialization check X-Git-Tag: release_3_0_5~90 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=cdf0f17dbd333809c4ca29799238dfb57a11a042;p=freeradius.git Fix initialization check --- diff --git a/src/main/connection.c b/src/main/connection.c index dce767a..adc8b61 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -309,10 +309,10 @@ static fr_connection_t *fr_connection_spawn(fr_connection_pool_t *pool, rad_assert(pool != NULL); /* - * Prevent all threads from blocking if the resource - * were managing connections for appears to be unavailable. + * If we have NO connections, don't open multiple + * connections until we successfully open at least one. */ - if (pool->num == 0) { + if ((pool->num == 0) && pool->pending) { return NULL; }