Skip to content

Commit

Permalink
Only prevent parallel spawn if we've previously failed opening a conn…
Browse files Browse the repository at this point in the history
…ection

Otherwise, for LDAP at least, we reject all the requests that get processed until the first connection has opened
  • Loading branch information
arr2036 committed Feb 12, 2015
1 parent 1f71145 commit 72523f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/connection.c
Expand Up @@ -311,10 +311,11 @@ static fr_connection_t *fr_connection_spawn(fr_connection_pool_t *pool,
rad_assert(pool != NULL);

/*
* If we have NO connections, don't open multiple
* connections until we successfully open at least one.
* If we have NO connections, and we've previously failed
* opening connections, don't open multiple connections until
* we successfully open at least one.
*/
if ((pool->num == 0) && pool->pending) {
if ((pool->num == 0) && pool->pending && pool->last_failed) {
return NULL;
}

Expand Down

0 comments on commit 72523f8

Please sign in to comment.