Skip to content

Commit

Permalink
Add ldap3.core.exceptions.LDAPSocketReceiveError in exception case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kota Tsuyuzaki committed Jan 12, 2021
1 parent d6d8151 commit 4686904
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,15 @@ def get_connection(self, userdn, password):
except (
ldap3.core.exceptions.LDAPSocketOpenError,
ldap3.core.exceptions.LDAPBindError,
ldap3.core.exceptions.LDAPSocketReceiveError,
):
for server, port in self._get_secondary_servers():
try:
return self._get_real_connection(userdn, password, server, port)
except (
ldap3.core.exceptions.LDAPSocketOpenError,
ldap3.core.exceptions.LDAPBindError,
ldap3.core.exceptions.LDAPSocketReceiveError,
):
continue
else:
Expand Down

0 comments on commit 4686904

Please sign in to comment.