Skip to content

Lookup "isn't done" #74

@ScottPeterJohnson

Description

@ScottPeterJohnson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions