chore: do not load cert pool if not necessary

This commit is contained in:
Skyxim 2023-03-29 20:12:12 +08:00
parent ae13418929
commit 2e1c5091c3

View File

@ -40,6 +40,9 @@ func ResetCertificate() {
}
func getCertPool() *x509.CertPool {
if len(trustCerts) == 0 {
return nil
}
if certPool == nil {
mutex.Lock()
defer mutex.Unlock()