37 lines
1.3 KiB
Text
37 lines
1.3 KiB
Text
|
From fd3d09d5bbd3bd03e5eeaaec900f0e45b67ca064 Mon Sep 17 00:00:00 2001
|
||
|
From: Alan Hicks <ahicks@p-o.co.uk>
|
||
|
Date: Sun, 2 Oct 2016 17:45:42 +0100
|
||
|
Subject: [PATCH 10/33] Give sensible default for retry 120s
|
||
|
|
||
|
---
|
||
|
src/modules/authldap.c | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git src/modules/authldap.c src/modules/authldap.c
|
||
|
index 2073768..1b1b1bd 100644
|
||
|
--- src/modules/authldap.c
|
||
|
+++ src/modules/authldap.c
|
||
|
@@ -127,7 +127,7 @@ static LDAP * ldap_con_get(void)
|
||
|
}
|
||
|
int c = 0;
|
||
|
int err = -1; // Start wanting success
|
||
|
- while (err != 0 && c++ < 5) {
|
||
|
+ while (err != 0 && c++ < 120) {
|
||
|
// Loop until success or too many retries
|
||
|
TRACE(TRACE_DEBUG, "No connection trying [%d]", c);
|
||
|
|
||
|
@@ -139,8 +139,8 @@ static LDAP * ldap_con_get(void)
|
||
|
TRACE(TRACE_DEBUG, "connection [%p]", ld);
|
||
|
break;
|
||
|
case LDAP_SERVER_DOWN:
|
||
|
- TRACE(TRACE_WARNING, "LDAP gone away: %s. Trying to reconnect(%d/5).", ldap_err2string(err),c);
|
||
|
- sleep(2); // reconnect failed. wait before trying again
|
||
|
+ TRACE(TRACE_WARNING, "LDAP gone away: %s. Trying to reconnect(%d/120).", ldap_err2string(err),c);
|
||
|
+ sleep(1); // reconnect failed. wait before trying again
|
||
|
break;
|
||
|
default:
|
||
|
TRACE(TRACE_ERR, "LDAP error(%d): %s", err, ldap_err2string(err));
|
||
|
--
|
||
|
2.10.1 (Apple Git-78)
|
||
|
|