From 2ce97762551c57bcfc24d1f71d8248a1cddbd107 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 30 Aug 2023 17:07:14 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/datatransferlogic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 9bc386b7..dea9b2b1 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -313,7 +313,8 @@ func (w *wsConnectItem) consumeInChanData() { case <-w.closeChan: return case data := <-w.inChan: - w.dealwithReciveData(data) + //对不同消息类型分发处理 + w.allocationProcessing(data) } } } @@ -382,7 +383,7 @@ func (w *wsConnectItem) respondDataFormat(msgType constants.Websocket, data inte } // 处理入口缓冲队列中不同类型的数据(分发处理) -func (w *wsConnectItem) dealwithReciveData(data []byte) { +func (w *wsConnectItem) allocationProcessing(data []byte) { var parseInfo websocket_data.DataTransferData if err := json.Unmarshal(data, &parseInfo); err != nil { w.incomeDataFormatErrResponse("invalid format of income message:" + string(data))