diff --git a/client/service.go b/client/service.go index 0e8a31bb..8cdc2fa7 100644 --- a/client/service.go +++ b/client/service.go @@ -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 }