diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 360573fe8..99e7b1fb1 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -81,8 +81,8 @@ func (t *TcpClient) handleConn(c net.Conn) { //t.printFail() } changePrinterStatus(printNo, status) + t.HandleCheckTcpHeart(printNo) } - t.HandleCheckTcpHeart(printNo) if t.getPrintStatus(printNo) != status { t.setPrintStatus(printNo, status) changePrinterStatus(printNo, status) @@ -222,7 +222,7 @@ func (t *TcpClient) doPrint(key string) (err error) { func (t *TcpClient) HandleCheckTcpHeart(key string) { go func() { for { - if time.Now().Sub(t.getPrintStatusTime(key)) > time.Minute+time.Second { + if time.Now().Sub(t.getPrintStatusTime(key)) > time.Minute+time.Second*2 { changePrinterStatus(key, printerStatusOffline) if t.isExist(key) { t.clear(key)