diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 03:42:34 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-06 03:42:34 +0000 |
commit | 46018c9d614cd47961cad5a39416687ebdd8d1cd (patch) | |
tree | a0caf8eba0e6a930177132a3f74d94d026986439 /net/base/dnsrr_resolver.cc | |
parent | 0444c8ac9a5fbc500fd8f59782aea359b54d04d9 (diff) | |
download | chromium_src-46018c9d614cd47961cad5a39416687ebdd8d1cd.zip chromium_src-46018c9d614cd47961cad5a39416687ebdd8d1cd.tar.gz chromium_src-46018c9d614cd47961cad5a39416687ebdd8d1cd.tar.bz2 |
Revert 99677 (didn't help) - Revert 99666 (sync tests started failing on mac10.6:
http://build.chromium.org/p/chromium/builders/Mac10.6%20Sync/builds/9198
- Linux: Monitor resolv.conf for changes and use that to reload resolver.
BUG=67734
TEST=manual testing by poking at resolv.conf
Review URL: http://codereview.chromium.org/6903061
TBR=craig.schlenter@chromium.org
Review URL: http://codereview.chromium.org/7833030
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/7737034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/dnsrr_resolver.cc')
-rw-r--r-- | net/base/dnsrr_resolver.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/net/base/dnsrr_resolver.cc b/net/base/dnsrr_resolver.cc index 2cfb0cf..e0d43d9 100644 --- a/net/base/dnsrr_resolver.cc +++ b/net/base/dnsrr_resolver.cc @@ -20,7 +20,7 @@ #include "base/synchronization/lock.h" #include "base/task.h" #include "base/threading/worker_pool.h" -#include "net/base/dns_reload_timer.h" +#include "net/base/dns_reloader.h" #include "net/base/dns_util.h" #include "net/base/net_errors.h" @@ -184,26 +184,18 @@ class RRResolverWorker { } bool r = true; +#if defined(OS_MACOSX) || defined(OS_OPENBSD) if ((_res.options & RES_INIT) == 0) { if (res_ninit(&_res) != 0) r = false; } +#else + DnsReloaderMaybeReload(); +#endif if (r) { unsigned long saved_options = _res.options; r = Do(); - -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) - 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 - // entries. - if (_res.nscount > 0) - res_nclose(&_res); - if (res_ninit(&_res) == 0) - r = Do(); - } -#endif _res.options = saved_options; } |