mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-27 20:25:41 +00:00
refactor: make reconnect operation return connection
This commit is contained in:
@@ -130,11 +130,11 @@ func (l *LDAP) reconnect() error {
|
||||
|
||||
operation := func() (*ldapgo.Conn, error) {
|
||||
l.Conn.Close()
|
||||
_, err := l.connect()
|
||||
conn, err := l.connect()
|
||||
if err != nil {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, nil
|
||||
return conn, nil
|
||||
}
|
||||
|
||||
_, err := backoff.Retry(context.TODO(), operation, backoff.WithBackOff(exp), backoff.WithMaxTries(3))
|
||||
|
||||
Reference in New Issue
Block a user