fix
This commit is contained in:
parent
c24ddb4af2
commit
90277394fa
|
@ -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
|
||||
}
|
||||
//检测通过可以用旧的
|
||||
|
|
Loading…
Reference in New Issue
Block a user