Explorar o código

Merge pull request #1904 from hex2tan/master

fixed add new vmess user bug
Kslr %!s(int64=6) %!d(string=hai) anos
pai
achega
876e2fcc73
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      proxy/vmess/inbound/inbound.go

+ 2 - 2
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
 }