修复可能崩溃的bug

This commit is contained in:
caohaidi 2018-12-22 18:59:09 +08:00
parent dda7861742
commit 83b9e076f9

View File

@ -228,7 +228,9 @@ func (svr *Service) ReloadConf(pxyCfgs map[string]config.ProxyConf, visitorCfgs
func (svr *Service) Close() {
atomic.StoreUint32(&svr.exit, 1)
svr.ctl.Close()
if svr.ctl != nil {
svr.ctl.Close()
}
svr.closedCh <- true
}