npe fix in crawler

pull/1/head
Michael Peter Christen 11 years ago
parent 8d650ca225
commit 49d91b94c3

@ -336,7 +336,7 @@ public class HostBalancer implements Balancer {
rhq = this.queues.get(rhh);
}
// to prevent that the complete roundrobinhosthashes are taken for each round, we remove the entries from the top of the fast queue
List<String> lastEntries = fastTree.lastEntry().getValue();
List<String> lastEntries = fastTree.size() > 0 ? fastTree.lastEntry().getValue() : null;
if (lastEntries != null) {
for (String h: lastEntries) this.roundRobinHostHashes.remove(h);
}

Loading…
Cancel
Save