mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-27 09:17:12 +00:00
chore: do not load cert pool if not necessary
This commit is contained in:
@@ -40,6 +40,9 @@ func ResetCertificate() {
|
||||
}
|
||||
|
||||
func getCertPool() *x509.CertPool {
|
||||
if len(trustCerts) == 0 {
|
||||
return nil
|
||||
}
|
||||
if certPool == nil {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user