I have a fairly simple DNS lookup, equivalent to this:
Lookup lookup = Lookup(domain, type);
lookup.run();
lookup.getResult();
It occasionally throws:
java.lang.IllegalStateException: Lookup of localhost MX isn't done
at org.xbill.DNS.Lookup.checkDone(Lookup.java:595)
at org.xbill.DNS.Lookup.getResult(Lookup.java:632)
The lookup type is usually MX or A, and the domains vary but it seems to happen fairly often with "localhost".
I tried looking through the code, but it's very difficult to follow what conditions would result in done && result != -1 being false after a lookup has been run. And I haven't been able to replicate locally to attach a debugger.
I have a fairly simple DNS lookup, equivalent to this:
It occasionally throws:
The lookup type is usually MX or A, and the domains vary but it seems to happen fairly often with "localhost".
I tried looking through the code, but it's very difficult to follow what conditions would result in
done && result != -1being false after a lookup has been run. And I haven't been able to replicate locally to attach a debugger.