do not try to connect to hopeless hosts

This commit is contained in:
Zlatin Balevsky
2020-09-17 19:58:36 +01:00
parent b18772465c
commit e531093b28

View File

@ -86,7 +86,7 @@ class HostCache extends Service {
rv.retainAll {allowHost(hosts[it])}
rv.removeAll {
def h = hosts[it];
(h.isFailed() && !h.canTryAgain()) || h.isRecentlyRejected()
(h.isFailed() && !h.canTryAgain()) || h.isRecentlyRejected() || h.isHopeless()
}
if (rv.size() <= n)
return rv