mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 03:32:33 +08:00
chore: do not load cert pool if not necessary
This commit is contained in:
parent
ae13418929
commit
2e1c5091c3
|
@ -40,6 +40,9 @@ func ResetCertificate() {
|
|||
}
|
||||
|
||||
func getCertPool() *x509.CertPool {
|
||||
if len(trustCerts) == 0 {
|
||||
return nil
|
||||
}
|
||||
if certPool == nil {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
|
|
Loading…
Reference in New Issue
Block a user