From 83b9e076f9dbde90a0944f6dec94b1035034abbb Mon Sep 17 00:00:00 2001 From: caohaidi Date: Sat, 22 Dec 2018 18:59:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }