aa
This commit is contained in:
@@ -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,6 +304,14 @@ 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")
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user