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

Re: ASYNC call blocking



I think you have a misconception between the different of
ldap_foo and ldap_foo_s interfaces.  The latter will not
return (in absence of an error) until the response(s) for
the request is received.  The former returns as soon as
the request is sent.  However, the former can easily
block attempting to send the request.

I note that in addition to I/O blocks sending a request,
a call can also block doing name resolution, connecting,
establishing security layers, etc..

- Kurt

At 11:41 AM 3/6/2006, Jeremiah Martell wrote:
>I posted a message a week ago about the ASYNC ldap_bind call blocking.
>
>ldap_bind is supposed to be ASYNC and not block, and ldap_bind_s is
>supposed to be SYNC and block. But both ldap_bind_s AND ldap_bind is
>blocking.
>
>ldap_bind will block with a bogus IP or with no active internet connection.
>
>Has anybody successfully used ldap_bind? Is this a known bug? Is there
>a workaround? Has it been fixed since 2.2.17?
>
>Thanks,
>
> - Jeremiah
>
>------------------------------------
>Hello,
>
>   It seems that a call to ldap_bind blocks. I expected ldap_bind to
>always immediately return the id. However, if I unplug the ethernet
>cable from my computer and run my application, the call to ldap_bind
>blocks. While my application is sitting there blocked if I plug the
>ethernet plug back in, the call returns the id and then behaves as
>expected.
>   I also noticed that ldap_bind blocks if you're attempting to
>connect to a bogus IP address.
>   Is there something else I need to do so that ldap_bind never blocks?
>
>   I'm using openldap-2.2.17.
>
>   Thanks,
>
>--
> - Jeremiah
> inlovewithGod@gmail.com