mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 20:55:42 +00:00
refactor: close connection before trying to reconnect
This commit is contained in:
@@ -129,6 +129,7 @@ func (l *LDAP) reconnect() error {
|
|||||||
exp.Reset()
|
exp.Reset()
|
||||||
|
|
||||||
operation := func() (*ldapgo.Conn, error) {
|
operation := func() (*ldapgo.Conn, error) {
|
||||||
|
l.Conn.Close()
|
||||||
_, err := l.connect()
|
_, err := l.connect()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user