fix
This commit is contained in:
parent
3f9672af6f
commit
a395d1972e
|
@ -316,6 +316,9 @@ func ConsumeUserPoolData(ctx context.Context) {
|
||||||
|
|
||||||
// 获取mapUserConnPool唯一id
|
// 获取mapUserConnPool唯一id
|
||||||
func getmapUserConnPoolUniqueId(userId, guestId int64) (uniqueId string) {
|
func getmapUserConnPoolUniqueId(userId, guestId int64) (uniqueId string) {
|
||||||
|
if userId > 0 {
|
||||||
|
guestId = 0
|
||||||
|
}
|
||||||
return fmt.Sprintf("%d_%d", userId, guestId)
|
return fmt.Sprintf("%d_%d", userId, guestId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,6 +351,9 @@ func (l *DataTransferLogic) checkAuth(r *http.Request) (isAuth bool, userInfo *a
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
if userInfo.UserId > 0 {
|
||||||
|
userInfo.GuestId = 0
|
||||||
|
}
|
||||||
//白板用户
|
//白板用户
|
||||||
return true, userInfo
|
return true, userInfo
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,5 +75,8 @@ func (r *reuseConnProcessor) allocationMessage(w *wsConnectItem, data []byte) {
|
||||||
|
|
||||||
// 获取用户拼接部分(复用标识用到)
|
// 获取用户拼接部分(复用标识用到)
|
||||||
func getUserJoinPart(userId, guestId int64, userAgent string) string {
|
func getUserJoinPart(userId, guestId int64, userAgent string) string {
|
||||||
|
if userId > 0 {
|
||||||
|
guestId = 0
|
||||||
|
}
|
||||||
return fmt.Sprintf("|_%d_%d_|_%s_|", userId, guestId, userAgent)
|
return fmt.Sprintf("|_%d_%d_|_%s_|", userId, guestId, userAgent)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user