Browse Source

Chore: Use a more direct and less error-prone return value (#4008)

Signed-off-by: pinglanlu <[email protected]>
pinglanlu 11 months ago
parent
commit
7b4a686b74
2 changed files with 2 additions and 2 deletions
  1. 1 1
      proxy/vmess/validator.go
  2. 1 1
      transport/internet/tls/config_other.go

+ 1 - 1
proxy/vmess/validator.go

@@ -81,7 +81,7 @@ func (v *TimedUserValidator) GetAEAD(userHash []byte) (*protocol.MemoryUser, boo
 	if err != nil {
 		return nil, false, err
 	}
-	return userd.(*protocol.MemoryUser), true, err
+	return userd.(*protocol.MemoryUser), true, nil
 }
 
 func (v *TimedUserValidator) Remove(email string) bool {

+ 1 - 1
transport/internet/tls/config_other.go

@@ -51,5 +51,5 @@ func (c *Config) getCertPool() (*x509.CertPool, error) {
 			return nil, errors.New("append cert to root").AtWarning().Base(err)
 		}
 	}
-	return pool, err
+	return pool, nil
 }