Merge pull request #547 from angelnu/fix_ldap_hang

fixes #546 - ldap hang
This commit is contained in:
Max Mazurov 2022-10-30 18:06:54 +03:00 committed by GitHub
commit 5e84fa4373
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -183,6 +183,7 @@ func (a *Auth) getConn() (*ldap.Conn, error) {
if a.conn == nil {
conn, err := a.newConn()
if err != nil {
a.connLock.Unlock()
return nil, err
}
a.conn = conn
@ -191,6 +192,7 @@ func (a *Auth) getConn() (*ldap.Conn, error) {
a.conn.Close()
conn, err := a.newConn()
if err != nil {
a.connLock.Unlock()
return nil, err
}
a.conn = conn