From 5534fe5fb60eff4cf2d8d55071bde5db63b39a70 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 2 Aug 2021 14:48:09 +0800 Subject: [PATCH] aa --- business/jxstore/event/event_tcp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)