From 3d63ec4e782a06a00a660de11062aad03397a00c Mon Sep 17 00:00:00 2001 From: hex2tan Date: Thu, 26 Sep 2019 13:48:52 +0800 Subject: [PATCH] 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. --- proxy/vmess/inbound/inbound.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index 409900b1..fe86ef2e 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -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 }