Re: timeout on ldap_simple_bind_s()

Anton Bobrov <[email protected]> Fri, 11 Sep 2009 14:02:46 +0200
Newsgroups gmane.comp.mozilla.devel.directory
Organization Sun Microsystems, Inc.
Message-ID <[email protected]>
Xu, Qiang (FXSGSC) wrote:

> Just can't explain why ldap_simple_bind() can block such a long time. ldap_result() is never entered at all. I am thinking that in what condition, the combination of ldap_simple_bind() and ldap_result(), with a non-NULL timeout pointer, takes effect.
> 
> In my case (the LDAP server is pointed to a windows XP workstation, which is not an AD), is there any way to unblock the call of ldap_simple_bind()?
> 
> Totally lost here,

if you are using NSPR there you should try setting [before init calls]

prldap_set_session_option( NULL, NULL, PRLDAP_OPT_IO_MAX_TIMEOUT, 5000 
/* 5s */);

and see if that helps to get it to timeout in about 5 seconds.

otherwise the stack trace is useless, i cant tell anything from it.