Index: net/base/host_resolver_proc.cc |
diff --git a/net/base/host_resolver_proc.cc b/net/base/host_resolver_proc.cc |
index 88e0ba135da49965b9087b067c17380f9cd99d24..34ecd9c21581f8104db799b32f5055e5af249590 100644 |
--- a/net/base/host_resolver_proc.cc |
+++ b/net/base/host_resolver_proc.cc |
@@ -8,7 +8,7 @@ |
#include "base/logging.h" |
#include "net/base/address_list.h" |
-#include "net/base/dns_reload_timer.h" |
+#include "net/base/dns_reloader.h" |
#include "net/base/net_errors.h" |
#include "net/base/sys_addrinfo.h" |
@@ -196,22 +196,12 @@ int SystemHostResolverProc(const std::string& host, |
// Restrict result set to only this socket type to avoid duplicates. |
hints.ai_socktype = SOCK_STREAM; |
- int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); |
- bool should_retry = false; |
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ |
eroman
2011/07/25 20:13:03
nit: I wander if it would be cleaner to internaliz
Craig
2011/08/03 19:30:58
I'll do this but I'm going to chase the symlink st
|
!defined(OS_ANDROID) |
- // 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()) { |
- // When there's no network connection, _res may not be initialized by |
- // getaddrinfo. Therefore, we call res_nclose only when there are ns |
- // entries. |
- if (_res.nscount > 0) |
- res_nclose(&_res); |
- if (!res_ninit(&_res)) |
- should_retry = true; |
- } |
+ DnsReloaderMaybeReload(); |
#endif |
+ int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); |
+ bool should_retry = false; |
// If the lookup was restricted (either by address family, or address |
// detection), and the results where all localhost of a single family, |
// maybe we should retry. There were several bugs related to these |