diff --git a/client/service.go b/client/service.go index 30bd3f8..3a08d4e 100644 --- a/client/service.go +++ b/client/service.go @@ -198,6 +198,10 @@ func (svr *Service) keepControllerWorking() { } for { + if atomic.LoadUint32(&svr.exit) != 0 { + return + } + xl.Info("try to reconnect to server...") conn, session, err := svr.login() if err != nil {