aa
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user