From 979c5c9e142b30a2c11f0820c89b28333e02ad2f Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 10 Aug 2023 15:21:28 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/datatransferlogic.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 9884c18d..70891d9d 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -87,8 +87,8 @@ func (l *DataTransferLogic) DataTransfer(svcCtx *svc.ServiceContext, w http.Resp return } defer conn.Close() - //鉴权不成功10秒后断开 - /*var ( + //鉴权不成功后断开 + var ( userInfo *auth.UserInfo isAuth bool ) @@ -105,10 +105,10 @@ func (l *DataTransferLogic) DataTransfer(svcCtx *svc.ServiceContext, w http.Resp //发送关闭信息 _ = conn.WriteMessage(websocket.CloseMessage, nil) return - }*/ + } //测试的目前写死 39 - var userInfo auth.UserInfo - userInfo.UserId = 39 + /*var userInfo auth.UserInfo + userInfo.UserId = 39*/ //生成连接唯一标识 uniqueId := websocketIdGenerator.Get() ws := wsConnectItem{