diff --git a/src/proxy/threads.go b/src/proxy/threads.go index 650361a..f0b3ec2 100644 --- a/src/proxy/threads.go +++ b/src/proxy/threads.go @@ -78,15 +78,18 @@ func (p *ForwardProxyCluster) ValidateProxiesThread() { // Sort the proxy into the right groups. if isThirdparty(pxy) { - newThirdpartyOnlineProxies = append(newThirdpartyOnlineProxies, pxy) - + okToAdd := true for _, d := range config.GetConfig().ThirdpartyTestUrls { _, bv3hiErr := sendRequestThroughProxy(pxy, d) if bv3hiErr != nil { - log.Debugf("Validate - Third-party %s failed: %s", proxyHost, bv3hiErr) + okToAdd = false newThirdpartyBrokenProxies = append(newThirdpartyBrokenProxies, pxy) + log.Debugf("Validate - Third-party %s failed: %s", proxyHost, bv3hiErr) } } + if okToAdd { + newThirdpartyOnlineProxies = append(newThirdpartyOnlineProxies, pxy) + } } else { newOurOnlineProxies = append(newOurOnlineProxies, pxy) }