diff --git a/src/main/java/de/gultsch/minidns/AndroidDNSClient.java b/src/main/java/de/gultsch/minidns/AndroidDNSClient.java index d47430339..047799815 100644 --- a/src/main/java/de/gultsch/minidns/AndroidDNSClient.java +++ b/src/main/java/de/gultsch/minidns/AndroidDNSClient.java @@ -70,6 +70,9 @@ public class AndroidDNSClient extends AbstractDNSClient { for (final DNSServer dnsServer : getDNSServers()) { final QuestionServerTuple cacheKey = new QuestionServerTuple(dnsServer, question); final DNSMessage cachedResponse = queryCache(cacheKey); + if (cachedResponse != null) { + return cachedResponse; + } final DNSMessage response = this.networkDataSource.query(question, dnsServer); if (response == null) { continue;