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