From 91ac528f24c9603ab7b823e8cf7a81dc437b5088 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 28 Jun 2021 19:01:09 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index e7b5d24a9..3773947bb 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -75,7 +75,6 @@ func handleConn(c net.Conn) { globals.SugarLogger.Debugf("conn is nil") return } - globals.SugarLogger.Debugf("handleConn map: [%v]", utils.Format4Output(tcpClient.Clients, false)) defer c.Close() buffer := make([]byte, 1024) for { @@ -88,6 +87,7 @@ func handleConn(c net.Conn) { } return } + globals.SugarLogger.Debugf("handleConn map: [%v]", utils.Format4Output(tcpClient.Clients, false)) //看是心跳还是打印返回 data := hex.EncodeToString(buffer[:n]) globals.SugarLogger.Debugf("handleConn heart : [%v]", data) @@ -95,6 +95,7 @@ func handleConn(c net.Conn) { if strings.Contains(data, heartText) { printNoData, _ := hex.DecodeString(data[len(heartText) : len(data)-8]) printNo = string(printNoData) + globals.SugarLogger.Debugf("handleConn printno :[%v]", printNo) if tcpClient.Clients[printNo] == nil { tcpClient.Clients[printNo] = c } else { @@ -151,6 +152,7 @@ func HandleTcpMessages() { //一直读? var err error prints, _ := dao.GetPrintMsgs(db, printMsgWait, offset, pageSize) + globals.SugarLogger.Debugf("HandleTcpMessages, len prints: [%v]", len(prints)) for _, printMsg := range prints { if printMsg != nil { if err = checkPrintMsg(printMsg); err == nil {