refactor: close connection before trying to reconnect

This commit is contained in:
Stavros
2025-07-14 20:10:15 +03:00
parent 63d39b5500
commit 736f65b7b2

View File

@@ -129,6 +129,7 @@ func (l *LDAP) reconnect() error {
exp.Reset()
operation := func() (*ldapgo.Conn, error) {
l.Conn.Close()
_, err := l.connect()
if err != nil {
return nil, nil