Index: net/base/dnsrr_resolver.cc |
=================================================================== |
--- net/base/dnsrr_resolver.cc (revision 70147) |
+++ net/base/dnsrr_resolver.cc (working copy) |
@@ -164,8 +164,14 @@ |
return; |
} |
+ bool need_init = (_res.options & RES_INIT) == 0; |
+#if WATCH_RESOLV_CONF |
+ need_init |= ResolvConfUpdated(); |
+#endif |
+ |
bool r = true; |
- if ((_res.options & RES_INIT) == 0) { |
+ if (need_init) { |
+ LOG(INFO) << "Initializing resolver"; |
if (res_ninit(&_res) != 0) |
r = false; |
} |
@@ -174,7 +180,7 @@ |
unsigned long saved_options = _res.options; |
r = Do(); |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) |
+#if WATCH_RESOLV_CONF |
if (!r && DnsReloadTimerHasExpired()) { |
// When there's no network connection, _res may not be initialized by |
// getaddrinfo. Therefore, we call res_nclose only when there are ns |