diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2021-05-25 22:19:40 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2021-05-26 22:14:44 +0200 |
commit | 6d5a2eb0ed9f9090c354852c520c3504b365cf7d (patch) | |
tree | 93ef881cb05eb2f67a336abd741b843a328483e8 | |
parent | 5226a6f56bdf64502bc86d8892d9d59ed5c6bc5a (diff) |
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
-rw-r--r-- | nslcd/myldap.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } } } |