From 6a63d53117a40c10f17cf3f4c14c0a0a5e679a2f Mon Sep 17 00:00:00 2001 From: lijun Date: Wed, 15 Jan 2025 23:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=EF=BC=8C?= =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=E5=AF=BC=E8=87=B4=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=87=BA=E9=94=99-=E6=B5=8B=E8=AF=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/tool.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/tool.go b/service/tool.go index e07d603..38fcb85 100644 --- a/service/tool.go +++ b/service/tool.go @@ -159,6 +159,11 @@ func Get(url string) int { } func GetVideoStream(id int) { + defer func() { + if err := recover(); err != nil { + log.Printf("设备:%d 错误: %v\n", id, err) + } + }() is_get, ok := DeviceIsGettingFrame.Load(id) if !ok { log.Printf("device: %d not found", id)