Commit 0ad91e05 authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Ondřej Kuzník
Browse files

Do not back off until we get a failure

parent cda8411c
......@@ -277,7 +277,8 @@ backend_retry( Backend *b )
}
if ( b->b_active + b->b_bindavail + b->b_opening < requested ) {
if ( b->b_opening > 0 || b->b_failed > 0 ) {
if ( !event_pending( b->b_retry_event, EV_TIMEOUT, NULL ) ) {
if ( b->b_failed > 0 &&
!event_pending( b->b_retry_event, EV_TIMEOUT, NULL ) ) {
Debug( LDAP_DEBUG_CONNS, "backend_retry: "
"scheduling a retry in %d ms\n",
b->b_retry_timeout );
......@@ -287,7 +288,7 @@ backend_retry( Backend *b )
return;
} else {
Debug( LDAP_DEBUG_CONNS, "backend_retry: "
"retry already scheduled\n" );
"retry in progress already\n" );
}
} else {
Debug( LDAP_DEBUG_CONNS, "backend_retry: "
......@@ -323,7 +324,8 @@ backend_connect( evutil_socket_t s, short what, void *arg )
ldap_pvt_thread_mutex_lock( &b->b_mutex );
Debug( LDAP_DEBUG_CONNS, "backend_connect: "
"attempting connection to %s\n",
"%sattempting connection to %s\n",
(what & EV_TIMEOUT) ? "retry timeout finished, " : "",
b->b_host );
#ifdef LDAP_PF_LOCAL
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment