diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 6f9da962f..272d575fb 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -103,12 +103,12 @@ func (t *TcpClient) handleConn(c net.Conn) { globals.SugarLogger.Debugf("handleConn print model %v", utils.Format4Output(t.Clients[printNo], true)) } else if strings.Contains(data, printText) { //打印回调 globals.SugarLogger.Debugf("handleConn print callback: %v", data) - //更新打印机心跳时间(打印机本身不会在打印的同时,或回调的同时发心跳消息,会导致心跳判断超时,这里更新一下) - t.setPrintStatusTime(printNo) - globals.SugarLogger.Debugf("handleConn print callback statusTime: %v", t.Clients[printNo].StatusTime) //打印消息发送后,打印机会回调该条打印消息的状态(打印成功or失败,失败原因..) //将回调的信息放到回调channel中,打印成功后再打印下一条消息 _, printNo = getCallbackMsgInfo(data) + //更新打印机心跳时间(打印机本身不会在打印的同时,或回调的同时发心跳消息,会导致心跳判断超时,这里更新一下) + t.setPrintStatusTime(printNo) + globals.SugarLogger.Debugf("handleConn print callback statusTime: %v", t.Clients[printNo].StatusTime) t.addCallbackChan(printNo, data) } }