kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
739 stars 253 forks source link

adding max_down_retries for #136 and #51 #169

Closed dkiser closed 7 years ago

dkiser commented 7 years ago

Implementation of a max_down_retries count utilized in the main ngx_http_auth_ldap_read_handler loop in order to retry connecting to an LDAP server if the underlying file descriptor asynchronously being selected on is closed or becomes disconnected.

I've tested with max_down_retries = 0 and am able to re-create the can't connect errors. Setting it to a number greater than zero shows reconnecting in debug logs and the proxy caller no longer times out.