summaryrefslogtreecommitdiffstats
path: root/net/dns/dns_config_service_posix.cc
diff options
context:
space:
mode:
authorszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-15 01:26:45 +0000
committerszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-15 01:26:45 +0000
commit05b4a32bf82c4a40e5fb8f85ae479b5ec1b6fe1e (patch)
treecdaa10f49bba4dea21ef9e3e384e05485e1e36ab /net/dns/dns_config_service_posix.cc
parentcb13569f6b3026bd2f781ff28796a4adf272c43a (diff)
downloadchromium_src-05b4a32bf82c4a40e5fb8f85ae479b5ec1b6fe1e.zip
chromium_src-05b4a32bf82c4a40e5fb8f85ae479b5ec1b6fe1e.tar.gz
chromium_src-05b4a32bf82c4a40e5fb8f85ae479b5ec1b6fe1e.tar.bz2
[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
Diffstat (limited to 'net/dns/dns_config_service_posix.cc')
-rw-r--r--net/dns/dns_config_service_posix.cc2
1 files changed, 2 insertions, 0 deletions
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;
}