This commit is contained in:
laodaming 2023-09-22 15:24:16 +08:00
parent b6651c4bdc
commit f6e073bb41
2 changed files with 3 additions and 3 deletions

View File

@ -67,9 +67,9 @@ var (
//websocket连接存储
mapConnPool = sync.Map{}
//每个websocket连接入口缓冲队列长度默认值
websocketInChanLen = 1000
websocketInChanLen = 2000
//每个websocket连接出口缓冲队列长度默认值
websocketOutChanLen = 1000
websocketOutChanLen = 2000
//是否开启debug
openDebug = true
//允许跨域的origin

View File

@ -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
}
}