mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 21:47:40 +03:00
fixes #546 - ldap hang
This commit is contained in:
parent
dbf14fa083
commit
b98a283cc3
1 changed files with 2 additions and 0 deletions
|
@ -183,6 +183,7 @@ func (a *Auth) getConn() (*ldap.Conn, error) {
|
||||||
if a.conn == nil {
|
if a.conn == nil {
|
||||||
conn, err := a.newConn()
|
conn, err := a.newConn()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
a.connLock.Unlock()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
a.conn = conn
|
a.conn = conn
|
||||||
|
@ -191,6 +192,7 @@ func (a *Auth) getConn() (*ldap.Conn, error) {
|
||||||
a.conn.Close()
|
a.conn.Close()
|
||||||
conn, err := a.newConn()
|
conn, err := a.newConn()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
a.connLock.Unlock()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
a.conn = conn
|
a.conn = conn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue