Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: net/base/host_resolver_proc.cc

Issue 6033006: Use FileWatcher to watch system resolver config, on systems that require... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/base/dns_reload_timer.cc ('K') | « net/base/dnsrr_resolver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_proc.cc
===================================================================
--- net/base/host_resolver_proc.cc (revision 70147)
+++ net/base/host_resolver_proc.cc (working copy)
@@ -196,9 +196,14 @@
// Restrict result set to only this socket type to avoid duplicates.
hints.ai_socktype = SOCK_STREAM;
+#if WATCH_RESOLV_CONF
+ if (ResolvConfUpdated())
+ res_ninit(&_res);
+#endif
+
+ bool should_retry = false;
int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
- bool should_retry = false;
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
+#if WATCH_RESOLV_CONF
// If we fail, re-initialise the resolver just in case there have been any
// changes to /etc/resolv.conf and retry. See http://crbug.com/11380 for info.
if (err && DnsReloadTimerHasExpired()) {
« net/base/dns_reload_timer.cc ('K') | « net/base/dnsrr_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698