This commit is contained in:
suyl
2021-07-22 10:17:14 +08:00
parent c09b5f0d8a
commit e4e114e9d4

View File

@@ -441,7 +441,6 @@ func doPrint2(printMsgChan chan interface{}) (err error) {
func HandleCheckTcpHeart() {
for {
tcpClient.s.Lock()
keys := []string{}
for k, v := range tcpClient.Clients {
if time.Now().Sub(v.StatusTime) > time.Minute+time.Second {
@@ -449,7 +448,6 @@ func HandleCheckTcpHeart() {
keys = append(keys, k)
}
}
tcpClient.s.Unlock()
for _, v := range keys {
changePrinterStatus(v, printerStatusOffline)
if tcpClient.Clients[v] != nil {