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