mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 05:37:34 +03:00
Merge pull request #547 from angelnu/fix_ldap_hang
fixes #546 - ldap hang
This commit is contained in:
commit
5e84fa4373
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue