[client] Fixed a bug where service loops reconnection after disconnection.service is shut down and can not exit goroutine (#3012)

Co-authored-by: lizhisheng <zhishengli@deepglint.com>
This commit is contained in:
ChristLZS 2022-07-12 18:43:58 +08:00 committed by GitHub
parent fa7c05c617
commit 6f2571980c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {