From 7b4a686b7401ede2263b8cbf6136c720b6953e39 Mon Sep 17 00:00:00 2001 From: pinglanlu Date: Tue, 12 Nov 2024 23:44:41 +0800 Subject: [PATCH] Chore: Use a more direct and less error-prone return value (#4008) Signed-off-by: pinglanlu --- proxy/vmess/validator.go | 2 +- transport/internet/tls/config_other.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/vmess/validator.go b/proxy/vmess/validator.go index b3a82f30..bfffadcf 100644 --- a/proxy/vmess/validator.go +++ b/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 { diff --git a/transport/internet/tls/config_other.go b/transport/internet/tls/config_other.go index daaf39c7..efd18c93 100644 --- a/transport/internet/tls/config_other.go +++ b/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 }