Fix DNS lookup hang / Remove Comodo Secure DNS

Motivation:

- DNS lookup sometimes hang because it does not call
  tryToFinishResolve()
- Comodo Secure DNS handles negative lookup incorrectly.

Modifications:

- Add missing tryToFinishResolve()
- Remove Comodo Secure DNS servers from the list

Result

- DNS lookup does not hang on non-existent domain names
- More reliable DnsNameResolverTest
This commit is contained in:
Trustin Lee 2015-08-27 12:52:29 +09:00
parent 75efe016d6
commit 73f472b65d
2 changed files with 2 additions and 3 deletions

View File

@ -119,6 +119,7 @@ abstract class DnsNameResolverContext<T> {
private void query(InetSocketAddress nameServerAddr, final DnsQuestion question) { private void query(InetSocketAddress nameServerAddr, final DnsQuestion question) {
if (allowedQueries == 0 || promise.isCancelled()) { if (allowedQueries == 0 || promise.isCancelled()) {
tryToFinishResolve();
return; return;
} }

View File

@ -71,9 +71,7 @@ public class DnsNameResolverTest {
new InetSocketAddress("208.67.222.220", 53), new InetSocketAddress("208.67.222.220", 53),
new InetSocketAddress("208.67.220.222", 53), new InetSocketAddress("208.67.220.222", 53),
new InetSocketAddress("37.235.1.174", 53), // FreeDNS new InetSocketAddress("37.235.1.174", 53), // FreeDNS
new InetSocketAddress("37.235.1.177", 53), new InetSocketAddress("37.235.1.177", 53)
new InetSocketAddress("8.26.56.26", 53), // Comodo Secure DNS
new InetSocketAddress("8.20.247.20", 53)
); );
// Using the top-100 web sites ranked in Alexa.com (Oct 2014) // Using the top-100 web sites ranked in Alexa.com (Oct 2014)