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