[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: problem with blocking ldap_bind

On Tue, Jul 16, 2002 at 12:58:49PM +0200, Helmut Lehner wrote:

> But ldap_bind still blocks too long for our purpose if there is no route 
> to the LDAP-server, for example.

Hmm, thats what I implemented OPT_NETWORK_TIMEOUT for. If you use
ldap_init(), the actual TCP connect() will be delayd until the first ldap
operation, ie ldap_bind(). Connect _schould_ return after the timeout you
specified with ldap_set_option. You may send a truss output?

It schould work like this:

LDAP_OPT_NETWORK_TIMEOUT implements a non-blocking connect.
The timeout you pass to ldap_result is the maximum amount of time to
wait for the next ldap response, if the session is allready established.

 > LDAP_OPT_NETWORK_TIMEOUT specifies the maximum time to wait to establish
> > the TCP connection to the ldap server.
> I also set the LDAP_OPT_NETWORK_TIMEOUT and ldap_bind hangs for a while 
> (longer as specified in LDAP_OPT_NETWORK_TIMEOUT).
> Is there maybe another option i have to set, so that the call is 
> interrupted after a configurable time?