diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 72d7d4238..1c3eb6c29 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -196,14 +196,13 @@ func (t *TcpClient) doPrint(key string) (err error) { for { select { case <-t.TimeoutMap[key]: - close(t.MsgMap[key]) - close(t.CallBackMap[key]) globals.SugarLogger.Debugf("doPrint timeout") return default: select { case printMsg, ok := <-t.MsgMap[key]: if !ok { + globals.SugarLogger.Debugf("doPrint err !ok ...") return } var ( @@ -265,6 +264,8 @@ func (t *TcpClient) HandleCheckTcpHeart(key string) { select { case <-t.TimeoutMap[key]: t.Clients[key].C.Close() + close(t.MsgMap[key]) + close(t.CallBackMap[key]) globals.SugarLogger.Debugf("HandleCheckTcpHeart timeout") return default: