Honor login_fail_exit
when reconnecting
`login_fail_exit` is honored when initially connecting, but currently has no effect when reconnecting. This adds a check after attempting to reconnect, so that a failure there is treated the same as a failure during the initial connection, if `login_fail_exit` is set to true.
This commit is contained in:
parent
2a68c1152f
commit
88f4bcfca8
@ -177,6 +177,9 @@ func (svr *Service) keepControllerWorking() {
|
||||
xl.Info("try to reconnect to server...")
|
||||
conn, session, err := svr.login()
|
||||
if err != nil {
|
||||
if svr.cfg.LoginFailExit {
|
||||
return err
|
||||
}
|
||||
xl.Warn("reconnect to server error: %v", err)
|
||||
time.Sleep(delayTime)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user