use of org.minidns.iterative.IterativeClientException.LoopDetected in project minidns by MiniDNS.
the class ResolutionState method recurse.
void recurse(InetAddress address, DNSMessage query) throws LoopDetected, MaxIterativeStepsReached {
Question question = query.getQuestion();
if (!map.containsKey(address)) {
map.put(address, new HashSet<Question>());
} else if (map.get(address).contains(question)) {
throw new IterativeClientException.LoopDetected();
}
if (++steps > recursiveDnsClient.maxSteps) {
throw new IterativeClientException.MaxIterativeStepsReached();
}
boolean isNew = map.get(address).add(question);
assert (isNew);
}
Aggregations