We recently had a problem with our test LDAP server - it was hung and wouldn't respond to requests. As a result, our application hung forever* while trying to bind to it. This only happened on Unix machines - on Windows, the ldap_simple_bind_s
call timed out after about 30 seconds.
* I don't know if it really was forever, but it was at least several minutes.
I added calls to ldap_set_option
, trying both LDAP_OPT_TIMEOUT
and LDAP_OPT_NETWORK_TIMEOUT
, but the bind call still hung. Is there any way to make ldap_simple_bind_s
time out after some period of time of my choosing?