From ed4b8d11e3fce7be3bfb1a95d9e476d6e2b895b9 Mon Sep 17 00:00:00 2001 From: arraykeys Date: Mon, 7 May 2018 20:58:59 +0800 Subject: [PATCH] no message --- services/sps.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/sps.go b/services/sps.go index 665f9ed..84a791c 100644 --- a/services/sps.go +++ b/services/sps.go @@ -111,7 +111,12 @@ func (s *SPS) StopService() { } } for _, c := range s.userConns.Items() { - (*c.(*net.Conn)).Close() + if _,ok:=c.(*net.Conn);ok{ + (*c.(*net.Conn)).Close() + } + if _,ok:=c.(**net.Conn);ok{ + (*(*c.(**net.Conn))).Close() + } } } func (s *SPS) Start(args interface{}, log *logger.Logger) (err error) {