From a924dd325ce57a5882a665a7a9cccdf3eda961fe Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sun, 14 Jun 2020 00:32:04 +0800 Subject: [PATCH] Fix: don't auto health check on provider health check disabled --- adapters/provider/provider.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adapters/provider/provider.go b/adapters/provider/provider.go index 4968a48d..f5321e73 100644 --- a/adapters/provider/provider.go +++ b/adapters/provider/provider.go @@ -142,7 +142,9 @@ func proxiesParse(buf []byte) (interface{}, error) { func (pp *proxySetProvider) setProxies(proxies []C.Proxy) { pp.proxies = proxies pp.healthCheck.setProxy(proxies) - go pp.healthCheck.check() + if pp.healthCheck.auto() { + go pp.healthCheck.check() + } } func stopProxyProvider(pd *ProxySetProvider) {