diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 247a03547..db77d8c08 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -226,8 +226,8 @@ func handleConn(c net.Conn) { tcpClient.s.Unlock() } } else if strings.Contains(data, printText) { - //globals.SugarLogger.Debugf("handleConn print callback: %v", data) - //changePrintMsg(data) + globals.SugarLogger.Debugf("handleConn print callback: %v", data) + changePrintMsg(data) } } } @@ -304,19 +304,6 @@ func doPrint(printMsgChanFail chan *model.PrintMsg) (err error) { globals.SugarLogger.Debugf("handleTcpMessages success, data: %v", hex.EncodeToString(data)) printMsg.Status = printMsgAlreadySend dao.UpdateEntity(db, printMsg, "Status", "Comment") - for { - buffer := make([]byte, 1024) - n, _ := c.Read(buffer) - data := hex.EncodeToString(buffer[:n]) - if strings.Contains(data, printText) { - globals.SugarLogger.Debugf("handleConn print callback: %v", data) - changePrintMsg(data) - } - if len(buffer) > 0 { - break - } - } - } } }