From 90277394faf54d8456c39b8248f0386a94c08884 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 11 Oct 2023 17:58:38 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/datatransferlogic.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 207a2833..bd23c295 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -207,14 +207,17 @@ func (l *DataTransferLogic) setConnPool(conn *websocket.Conn, userInfo *auth.Use canUseOldWid := true //长度太短 if lendecryptionWid <= lenUserPart { + logx.Info("复用的连接标识太短,不符合重用条件") canUseOldWid = false } //尾部不同不能复用 if decryptionWid[lendecryptionWid-lenUserPart:] != userPart { + logx.Info("尾部用户信息不同,不符合重用条件") canUseOldWid = false } //存在是不能给他申请重新绑定 if _, ok := mapConnPool.Load(oldWid); ok { + logx.Info("复用的连接标识已被其他客户端使用,不符合重用条件") canUseOldWid = false } //检测通过可以用旧的