From 378cf9f2a52b4fc39097488b613ec50d98e8a28e Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Mon, 6 Jun 2016 13:34:30 -0700 Subject: [PATCH] TS-4331 TTL is in seconds, not nanoseconds This closes #695 --- iocore/hostdb/HostDB.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index 6cbb9a2c62b..8c9f05c57c2 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -1995,7 +1995,7 @@ HostDBContinuation::do_dns() if (action.continuation) { // Set the TTL based on how much time remains until the next sync HostDBInfo *r = lookup_done(IpAddr(find_result->second), md5.host_name, false, - current_host_file_map->next_sync_time - Thread::get_hrtime(), NULL); + (current_host_file_map->next_sync_time - Thread::get_hrtime()) / HRTIME_SECOND, NULL); reply_to_cont(action.continuation, r); } hostdb_cont_free(this);