This commit is contained in:
邹宗楠
2022-12-16 10:41:56 +08:00
parent c92f7c9955
commit 2ca0df3f40

View File

@@ -196,10 +196,11 @@ func (t *TcpClient) doPrint(key string) (err error) {
} }
go func() { go func() {
for { for {
if t.readTimeoutMap(key) { select {
case <-t.TimeoutMap[key]:
globals.SugarLogger.Debugf("doPrint timeout") globals.SugarLogger.Debugf("doPrint timeout")
return return
} else { default:
select { select {
case printMsg, ok := <-t.MsgMap[key]: case printMsg, ok := <-t.MsgMap[key]:
if !ok { if !ok {