This commit is contained in:
suyl
2021-08-03 11:35:18 +08:00
parent 464783d2ff
commit 9969299821

View File

@@ -51,7 +51,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
} else {
fmt.Println("ReadString err", err)
}
//return
return
}
//也可能是查状态的openAPI外部查询一次性的
if err = json.Unmarshal(buffer[:n], &printStatus); err == nil {
@@ -234,6 +234,7 @@ func (t *TcpClient) doPrint(key string) (err error) {
dao.UpdateEntity(db, printMsg, "Status", "Comment")
if t.isExist(key) {
t.clear(key)
globals.SugarLogger.Debugf("handleTcpMessages clear1...")
}
return
} else {
@@ -243,6 +244,7 @@ func (t *TcpClient) doPrint(key string) (err error) {
//t.delConn(printMsg.PrintNo)
if t.isExist(key) {
t.clear(key)
globals.SugarLogger.Debugf("handleTcpMessages clear2...")
}
return
} else {
@@ -277,6 +279,7 @@ func (t *TcpClient) HandleCheckTcpHeart(key string) {
changePrinterStatus(key, printerStatusOffline)
if t.isExist(key) {
t.clear(key)
globals.SugarLogger.Debugf("HandleCheckTcpHeart clear...")
}
return
}