From 6d5a2eb0ed9f9090c354852c520c3504b365cf7d Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Tue, 25 May 2021 22:19:40 +0200 Subject: Retry connecting to the first URI after idle_timelimit This ensures that a connection to the first URI listed in the config file will be re-established once the connection is closed cleanly after the idle time. This ensures that the listed URIs are handled more in a primary/fallback manner if an idle time is configured. Closes https://github.com/arthurdejong/nss-pam-ldapd/issues/46 --- nslcd/myldap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 2dccc65..cdb5f6c 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -1062,6 +1062,8 @@ void myldap_session_check(MYLDAP_SESSION *session) { log_log(LOG_DEBUG, "myldap_session_check(): idle_timelimit reached"); do_close(session); + /* try to use the first URI from the list again */ + session->current_uri = 0; } } } -- cgit v1.2.3