This commit is contained in:
邹宗楠
2022-10-21 15:42:05 +08:00
parent 80e8bbcda8
commit c219086e7e
2 changed files with 2 additions and 0 deletions

View File

@@ -101,6 +101,7 @@ func (t *TcpClient) handleConn(c net.Conn) {
}
//状态不一致再更新状态(可能缺纸了,过热了等)
if t.getPrintStatus(printNo) != status {
globals.SugarLogger.Debugf("==========getPrintStatus:%s", printNo)
t.setPrintStatus(printNo, status)
changePrinterStatus(printNo, status)
}

View File

@@ -256,6 +256,7 @@ func (t *TcpClient) setPrintStatus(key string, status int) {
}
func (t *TcpClient) setPrintStatusTime(key string) {
globals.SugarLogger.Debugf("==========setPrintStatusTime:%s", key)
t.Lock()
defer t.Unlock()
if t.Clients[key] != nil {