Skip to content

Commit

Permalink
Fix handling of LDAP timeout errors.
Browse files Browse the repository at this point in the history
Submitted by: reg9009 [at] yahoo.de
Issue: 11
  • Loading branch information
landon.j.fuller committed Feb 25, 2012
1 parent f141f24 commit 2d1568c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ldap/TRLDAPConnection.m
Expand Up @@ -203,7 +203,7 @@ - (BOOL) bindWithDN: (TRString *) bindDN password: (TRString *) password {
/* Wait for the result */
timeout.tv_sec = _timeout;
timeout.tv_usec = 0;
if (ldap_result(ldapConn, msgid, 1, &timeout, &res) == -1) {
if (ldap_result(ldapConn, msgid, 1, &timeout, &res) <= 0) {
err = ldap_get_errno(ldapConn);
if (err == LDAP_TIMEOUT)
ldap_abandon_ext(ldapConn, msgid, NULL, NULL);
Expand Down

0 comments on commit 2d1568c

Please sign in to comment.