mirror of
https://github.com/v2ray/v2ray-core.git
synced 2024-04-21 12:31:52 +00:00
fixed add new user bug
fixed add new user bug. when add new user, just add the key(u.email) to the map(v.cache), the value of map is nil.
This commit is contained in:
@@ -47,11 +47,11 @@ func newUserByEmail(config *DefaultConfig) *userByEmail {
|
||||
|
||||
func (v *userByEmail) addNoLock(u *protocol.MemoryUser) bool {
|
||||
email := strings.ToLower(u.Email)
|
||||
user, found := v.cache[email]
|
||||
_, found := v.cache[email]
|
||||
if found {
|
||||
return false
|
||||
}
|
||||
v.cache[email] = user
|
||||
v.cache[email] = u
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user