优化代码

This commit is contained in:
刘祥超
2022-11-15 10:06:57 +08:00
parent a42737bd28
commit 825e46458f

View File

@@ -37,6 +37,10 @@ func (this *UserManager) UpdateUserServersIsEnabled(userId int64, isEnabled bool
}
func (this *UserManager) CheckUserServersIsEnabled(userId int64) (isEnabled bool) {
if userId <= 0 {
return true
}
this.locker.RLock()
u, ok := this.userMap[userId]
if ok {