This commit is contained in:
suyl
2021-06-29 10:39:20 +08:00
parent 8abcd3502b
commit 688bd6e363

View File

@@ -162,7 +162,9 @@ func HandleTcpMessages() {
if tcpClient.Clients[printMsg.PrintNo] != nil {
c = tcpClient.Clients[printMsg.PrintNo]
data, err = buildMsg(printMsg)
fmt.Println("2222222222222222222222222222222222")
} else {
fmt.Println("33333333333333333333333333333333333333")
changePrinterStatus(printMsg.PrintNo, printerStatusOffline)
}
}
@@ -177,6 +179,7 @@ func HandleTcpMessages() {
c.Close()
} else {
if c != nil {
fmt.Println("4444444444444444444444444444444444444")
if _, err = c.Write(data); err != nil {
globals.SugarLogger.Debugf("handleTcpMessages err [%v]", err)
delete(tcpClient.Clients, printMsg.PrintNo)