aa
This commit is contained in:
@@ -222,11 +222,13 @@ func (t *TcpClient) doPrint(key string) (err error) {
|
|||||||
func (t *TcpClient) HandleCheckTcpHeart(key string) {
|
func (t *TcpClient) HandleCheckTcpHeart(key string) {
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
if time.Now().Sub(t.getPrintStatusTime(key)) > time.Minute+time.Second*2 {
|
if !utils.IsTimeZero(t.getPrintStatusTime(key)) {
|
||||||
changePrinterStatus(key, printerStatusOffline)
|
if time.Now().Sub(t.getPrintStatusTime(key)) > time.Minute+time.Second*2 {
|
||||||
if t.isExist(key) {
|
changePrinterStatus(key, printerStatusOffline)
|
||||||
t.clear(key)
|
if t.isExist(key) {
|
||||||
return
|
t.clear(key)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//keys := []string{}
|
//keys := []string{}
|
||||||
|
|||||||
Reference in New Issue
Block a user