Why does ldap_result() API return success even if the LDAP server is not reachable
Posted on 2006-06-02
I have a c++ client program that is polling the Sun One directory server for changes. It uses ldap_result() API to wait for the result of LDAP operation. This call is returning 0 (success) in normal scenario when the client program is able to connect to the directory server and is returning -1 (error) when I stop the server, or pull out the network cable of my client machine.
But when I pull out the network cable of the server machine, I still get return value as 0 falsely indicating the client program successful operation. Could anyone throw some light on why this could be happening and that too only in the scenario when the server machine is taken out of network.