aa
This commit is contained in:
@@ -441,7 +441,6 @@ func doPrint2(printMsgChan chan interface{}) (err error) {
|
|||||||
|
|
||||||
func HandleCheckTcpHeart() {
|
func HandleCheckTcpHeart() {
|
||||||
for {
|
for {
|
||||||
tcpClient.s.Lock()
|
|
||||||
keys := []string{}
|
keys := []string{}
|
||||||
for k, v := range tcpClient.Clients {
|
for k, v := range tcpClient.Clients {
|
||||||
if time.Now().Sub(v.StatusTime) > time.Minute+time.Second {
|
if time.Now().Sub(v.StatusTime) > time.Minute+time.Second {
|
||||||
@@ -449,7 +448,6 @@ func HandleCheckTcpHeart() {
|
|||||||
keys = append(keys, k)
|
keys = append(keys, k)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tcpClient.s.Unlock()
|
|
||||||
for _, v := range keys {
|
for _, v := range keys {
|
||||||
changePrinterStatus(v, printerStatusOffline)
|
changePrinterStatus(v, printerStatusOffline)
|
||||||
if tcpClient.Clients[v] != nil {
|
if tcpClient.Clients[v] != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user