fix issue with invalid third-party proxy ending up in the valid third-party list
This commit is contained in:
parent
68a444c17c
commit
ea89052ef0
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue