This commit is contained in:
fatedier
2023-12-21 21:19:49 +08:00
committed by GitHub
parent 3bf6605e1a
commit 5e77c8e2d3
5 changed files with 6 additions and 18 deletions

View File

@@ -326,14 +326,13 @@ func (svr *Service) loopLoginUntilSuccess(maxInterval time.Duration, firstLoginE
}
svr.ctl = ctl
svr.ctlMu.Unlock()
return true, nil
}
// try to reconnect to server until success
wait.BackoffUntil(loginFunc, wait.NewFastBackoffManager(
wait.FastBackoffOptions{
Duration: time.Second,
Duration: time.Millisecond,
Factor: 2,
Jitter: 0.1,
MaxDuration: maxInterval,