Explorar o código

FIx a bug that mutex is passed by value.

V2Ray %!s(int64=10) %!d(string=hai) anos
pai
achega
c2904383b3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      proxy/vmess/protocol/user/userset.go

+ 1 - 1
proxy/vmess/protocol/user/userset.go

@@ -86,7 +86,7 @@ func (us *TimedUserSet) AddUser(user config.User) error {
 	return nil
 }
 
-func (us TimedUserSet) GetUser(userHash []byte) (config.User, int64, bool) {
+func (us *TimedUserSet) GetUser(userHash []byte) (config.User, int64, bool) {
 	defer us.access.RUnlock()
 	us.access.RLock()
 	pair, found := us.userHash[string(userHash)]