Call os.Exit on reconnect login fail
This commit is contained in:
parent
88f4bcfca8
commit
574322c96d
@ -21,6 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
@ -178,7 +179,8 @@ func (svr *Service) keepControllerWorking() {
|
|||||||
conn, session, err := svr.login()
|
conn, session, err := svr.login()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if svr.cfg.LoginFailExit {
|
if svr.cfg.LoginFailExit {
|
||||||
return err
|
xl.Error("reconnect to server error, exiting: %v", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
xl.Warn("reconnect to server error: %v", err)
|
xl.Warn("reconnect to server error: %v", err)
|
||||||
time.Sleep(delayTime)
|
time.Sleep(delayTime)
|
||||||
|
Loading…
Reference in New Issue
Block a user