From 05b4a32bf82c4a40e5fb8f85ae479b5ec1b6fe1e Mon Sep 17 00:00:00 2001 From: "szym@chromium.org" Date: Wed, 15 Aug 2012 01:26:45 +0000 Subject: [net/dns] Hardcode DnsConfig.timeout to 1 second. Currently, it is read from OS (if available) or set to 5 seconds (on Windows). In some cases the OS provides ridiculous values (30s on Mac). This change hard-codes the timeout to 1 second, which is the default used by getaddrinfo on Windows and Mac. BUG=124437 Review URL: https://chromiumcodereview.appspot.com/10826212 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151626 0039d316-1c4b-4281-b951-d872f2087c98 --- net/dns/dns_config_service_posix.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/dns/dns_config_service_posix.cc') diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc index ea51915..70a277e 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -58,6 +58,8 @@ ConfigParsePosixResult ReadDnsConfig(DnsConfig* config) { res_nclose(&res); #endif #endif + // Override timeout value to match default setting on Windows. + config->timeout = base::TimeDelta::FromSeconds(kDnsTimeoutSeconds); return result; } -- cgit v1.1