fix predicate

pull/53/head
Zlatin Balevsky 2020-10-21 04:06:00 +01:00
parent 2574f27fe8
commit 07a87e6257
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ class H2HostCache extends HostCache {
return rv
List<Destination> canTry = new ArrayList<>(allHosts)
canTry.removeAll { profiles.get(it).isHopeless() && !filter.test(it)}
canTry.retainAll { !profiles.get(it).isHopeless() && filter.test(it)}
Set<Destination> wouldFail = new HashSet<>()
while(rv.size() < n && wouldFail.size() < canTry.size()) {
Destination d = canTry.get((int)(Math.random() * canTry.size()))