From f6e073bb4105a7c4d37fb874f8989c9ce175a320 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 22 Sep 2023 15:24:16 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/datatransferlogic.go | 4 ++-- server/websocket/internal/logic/ws_render_image.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 7f434499..e3bb67db 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -67,9 +67,9 @@ var ( //websocket连接存储 mapConnPool = sync.Map{} //每个websocket连接入口缓冲队列长度默认值 - websocketInChanLen = 1000 + websocketInChanLen = 2000 //每个websocket连接出口缓冲队列长度默认值 - websocketOutChanLen = 1000 + websocketOutChanLen = 2000 //是否开启debug openDebug = true //允许跨域的origin diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 5aa0e109..30407b78 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -50,7 +50,7 @@ func (r *renderProcessor) allocationMessage(w *wsConnectItem, data []byte) { case w.extendRenderProperty.renderChan <- renderImageData: //发入到缓冲队列 return case <- time.After(time.Millisecond * 50)://超过50毫秒丢弃 - logx.Info("入渲染队列失败,队列满了,选择丢弃") + w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "渲染队列溢出,请稍后再发", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, 0, 0) return } }