From 4323dd24d0e02dc472ea3e476e780dca7b04a126 Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> 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 4968a48dd..f5321e73a 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) {