优化代码

This commit is contained in:
GoEdgeLab
2022-11-15 10:06:57 +08:00
parent 8712ddbca6
commit c64f57df5a

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 {