修复可能崩溃的bug
This commit is contained in:
parent
dda7861742
commit
83b9e076f9
@ -228,7 +228,9 @@ func (svr *Service) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs
|
|||||||
|
|
||||||
func (svr *Service) Close() {
|
func (svr *Service) Close() {
|
||||||
atomic.StoreUint32(&svr.exit, 1)
|
atomic.StoreUint32(&svr.exit, 1)
|
||||||
svr.ctl.Close()
|
if svr.ctl != nil {
|
||||||
|
svr.ctl.Close()
|
||||||
|
}
|
||||||
svr.closedCh <- true
|
svr.closedCh <- true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user