diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 86c07f4d8..1b58fd5d7 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -111,8 +111,8 @@ var ( regexpQrr = regexp.MustCompile(byteSignQrRight + "(.*?)" + byteSignQrRightE) regexpSound = regexp.MustCompile(byteSignSound + "(.*?)" + byteSignSoundE) - printMsgChan = make(chan *model.PrintMsg) - printMsgCallbackChan = make(chan string) + printMsgChan = make(chan *model.PrintMsg, 1024) + printMsgCallbackChan = make(chan string, 1024) printMsgChanFail = make(chan *model.PrintMsg) ) @@ -370,9 +370,9 @@ func HandleTcpMessages() { //一直读? prints, _ := dao.GetPrintMsgs(db, []int{printMsgWait}, time.Now().Add(-time.Hour*3), time.Now(), offset, pageSize) for _, printMsg := range prints { - printMsgChan <- printMsg printMsg.Status = printMsgAlreadyLoad dao.UpdateEntity(db, printMsg, "Status") + } } }