summaryrefslogtreecommitdiffstats
path: root/net/tools/hresolv
diff options
context:
space:
mode:
Diffstat (limited to 'net/tools/hresolv')
-rw-r--r--net/tools/hresolv/hresolv.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tools/hresolv/hresolv.cc b/net/tools/hresolv/hresolv.cc
index 18a98ff..f662817 100644
--- a/net/tools/hresolv/hresolv.cc
+++ b/net/tools/hresolv/hresolv.cc
@@ -446,8 +446,13 @@ int main(int argc, char** argv) {
}
}
+ net::HostCache* cache = new net::HostCache(
+ options.cache_size,
+ base::TimeDelta::FromMilliseconds(options.cache_ttl),
+ base::TimeDelta::FromSeconds(0));
+
scoped_refptr<net::HostResolver> host_resolver(
- new net::HostResolverImpl(NULL, options.cache_size, options.cache_ttl));
+ new net::HostResolverImpl(NULL, cache));
ResolverInvoker invoker(host_resolver.get());
invoker.ResolveAll(hosts_and_times, options.async);