From 2ca0df3f403317ced66cacb23926e557253642c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 16 Dec 2022 10:41:56 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index b21ae0783..1d60dc16b 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -196,10 +196,11 @@ func (t *TcpClient) doPrint(key string) (err error) { } go func() { for { - if t.readTimeoutMap(key) { + select { + case <-t.TimeoutMap[key]: globals.SugarLogger.Debugf("doPrint timeout") return - } else { + default: select { case printMsg, ok := <-t.MsgMap[key]: if !ok {