Don't check for spawn in area where it's false
authorAlan T. DeKok <aland@freeradius.org>
Mon, 27 Jul 2015 16:45:16 +0000 (12:45 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 27 Jul 2015 16:45:16 +0000 (12:45 -0400)
src/main/connection.c

index 6f762dd..0c7b120 100644 (file)
@@ -836,8 +836,8 @@ static void *fr_connection_get_internal(fr_connection_pool_t *pool, bool spawn)
                        pool->last_at_max = now;
                }
 
-               if (spawn) pthread_mutex_unlock(&pool->mutex);
-
+               pthread_mutex_unlock(&pool->mutex);
+               
                if (!RATE_LIMIT_ENABLED || complain) {
                        ERROR("%s: No connections available and at max connection limit", pool->log_prefix);
                }