From 1a21344d89a088a29d02761123babd56075ff6d6 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Thu, 22 Jul 2021 13:43:07 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index f44c7e20b..e2f782b0a 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -375,13 +375,6 @@ func HandleTcpMessages() { printMsgChan <- printMsg printMsg.Status = printMsgAlreadyLoad dao.UpdateEntity(db, printMsg, "Status") - Loop: - for { - if data, _ := <-printMsgCallbackChan; data != "" { - changePrintMsg(data) - break Loop - } - } } } } @@ -438,6 +431,11 @@ func doPrint2(printMsgChan chan *model.PrintMsg) (err error) { } } } + default: + select { + case data, _ := <-printMsgCallbackChan: + changePrintMsg(data) + } } } return err