Skip to content

Commit

Permalink
remove unnecessary "Need 0 more connections to reach..." INFO output
Browse files Browse the repository at this point in the history
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.

Manual merge of 6be96d3
  • Loading branch information
alandekok committed Nov 21, 2016
1 parent 9ed3dae commit ad44db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/connection.c
Expand Up @@ -676,7 +676,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request
* have fewer than "min". When that happens, open more
* connections to enforce "min".
*/
if ((pool->state.num + pool->state.pending) <= pool->min) {
if ((pool->state.num + pool->state.pending) < pool->min) {
spawn = pool->min - (pool->state.num + pool->state.pending);
extra = 0;

Expand All @@ -701,7 +701,7 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool, REQUEST *request
* 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"
Expand Down

0 comments on commit ad44db3

Please sign in to comment.