From f1401e8a9bdf63c35f6c2f9ce6c50542725bb0a8 Mon Sep 17 00:00:00 2001 From: lijun Date: Mon, 20 Jan 2025 18:56:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8v3=E8=8E=B7=E5=8F=96=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E5=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index 21d56dd..525e65f 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -245,13 +245,12 @@ func subscribeAndHandleMessagesV3(ws *websocket.Conn, device_id int) { } c = count t++ + if t%10 == 0 { + log.Printf("device:%d send frame count:%d,img is closed", device_id, c) + } err5 := img.Close() if err5 != nil { log.Printf("img close err:%v", err) - } else { - if t%10 == 0 { - log.Printf("device:%d send frame count:%d,img is closed", device_id, c) - } } } } else {