From c8a52321a589b343aa5ad6ea05a77a64948cd12b Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 22 Sep 2023 15:00:08 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/ws_render_image.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 44e5ae87..601b0ab3 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -97,6 +97,11 @@ func (w *wsConnectItem) consumeRenderImageData() { <-limitChan }() go func() { + defer func() { + if err := recover(); err != nil { + logx.Error( err) + } + }() select { case <-ctx.Done() : panic("渲染截止")