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 } //检测通过可以用旧的