From b8dbda6a4cf05332829248abf6bab14a67fc5e1c Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 30 Aug 2023 17:46:47 +0800 Subject: [PATCH] fix --- .../internal/logic/allocation_processing_factory.go | 4 ++-- server/websocket/internal/logic/ws_render_image.go | 5 +++-- server/websocket/internal/logic/ws_reuse_last_connect.go | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/websocket/internal/logic/allocation_processing_factory.go b/server/websocket/internal/logic/allocation_processing_factory.go index e28de1bf..19810773 100644 --- a/server/websocket/internal/logic/allocation_processing_factory.go +++ b/server/websocket/internal/logic/allocation_processing_factory.go @@ -19,10 +19,10 @@ func (w *wsConnectItem) newAllocationProcessor(msgType constants.Websocket) allo switch msgType { //图片渲染 case constants.WEBSOCKET_RENDER_IMAGE: - obj = &renderProcesser{w} + obj = &renderProcessor{w} //刷新重连请求恢复上次连接的标识 case constants.WEBSOCKET_REQUEST_REUSE_LAST_CONNECT: - obj = &reuseConnProcesser{w} + obj = &reuseConnProcessor{w} default: } diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 5700c01a..78f65fbf 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -19,7 +19,7 @@ import ( ) // 渲染处理器 -type renderProcesser struct { +type renderProcessor struct { w *wsConnectItem } @@ -49,7 +49,8 @@ type renderTask struct { uploadUnityRenderImageTakesTime int64 //上传unity渲染结果图时间 } -func (r *renderProcesser) allocationMessage(data []byte) { +func (r *renderProcessor) allocationMessage(data []byte) { + logx.Info("收到渲染任务消息:", string(data)) select { case <-r.w.closeChan: //已经关闭 return diff --git a/server/websocket/internal/logic/ws_reuse_last_connect.go b/server/websocket/internal/logic/ws_reuse_last_connect.go index d8e00d79..e826732c 100644 --- a/server/websocket/internal/logic/ws_reuse_last_connect.go +++ b/server/websocket/internal/logic/ws_reuse_last_connect.go @@ -10,11 +10,11 @@ import ( ) // 复用连接处理器 -type reuseConnProcesser struct { +type reuseConnProcessor struct { w *wsConnectItem } -func (r *reuseConnProcesser) allocationMessage(data []byte) { +func (r *reuseConnProcessor) allocationMessage(data []byte) { logx.Info("收到请求恢复上次连接标识数据:", string(data)) var wid string if err := json.Unmarshal(data, &wid); err != nil {