From 4874f930564d7102eacec109809e3ea24dc32695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 16 Dec 2022 15:11:52 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index e8258d1b8..ca4d4e8c9 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -61,6 +61,7 @@ func (t *TcpClient) handleConn(c net.Conn) { globals.SugarLogger.Debugf("======心跳 %s", data) printNoData, _ := hex.DecodeString(data[len(heartText) : len(data)-8]) printNo = string(printNoData) + globals.SugarLogger.Debugf("======printNo %s", printNo) status := printStatus2JxStatus(data[len(data)-8 : len(data)-6]) //globals.SugarLogger.Debugf("输出打印机编号printNo:[%s],和状态printStatus[%d],打印时间time:[%v]", printNo, status, time.Now()) //如果没在连接池里 @@ -101,6 +102,7 @@ func (t *TcpClient) handleConn(c net.Conn) { //打印消息发送后,打印机会回调该条打印消息的状态(打印成功or失败,失败原因..) //将回调的信息放到回调channel中,打印成功后再打印下一条消息 _, printNo = getCallbackMsgInfo(data) + globals.SugarLogger.Debugf("======printNo %s", printNo) //更新打印机心跳时间(打印机本身不会在打印的同时,或回调的同时发心跳消息,会导致心跳判断超时,这里更新一下) t.setPrintStatusTime(printNo) t.addCallbackChan(printNo, data)