forked from mirror/monocles_chat
retrieve DNS response from cache
(cherry picked from commit 1da9d42065d712ca68d44a0386f8477181ac103c)
This commit is contained in:
parent
1007e691cb
commit
884f36cd81
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue