aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-08-12 09:50:42 +1000
committerteor <teor@torproject.org>2019-08-12 09:50:42 +1000
commite5be039494745a3b0d101e422aa5793aaeac3567 (patch)
treef54b75ac063def4249d6a1db634e9e1af50ee96c /src/feature
parentf65f4b5c38bc79e2b3f1a10c21cedce9376ad87e (diff)
parent37aae23945c45c459091b38699130a14466d33ef (diff)
downloadtor-e5be039494745a3b0d101e422aa5793aaeac3567.tar.gz
tor-e5be039494745a3b0d101e422aa5793aaeac3567.zip
Merge remote-tracking branch 'tor-github/pr/1034' into maint-0.3.5
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/relay/dns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index d3660c47ef..cc9f4cf490 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -2130,7 +2130,8 @@ dns_cache_handle_oom(time_t now, size_t min_remove_bytes)
current_size -= bytes_removed;
total_bytes_removed += bytes_removed;
- time_inc += 3600; /* Increase time_inc by 1 hour. */
+ /* Increase time_inc by a reasonable fraction. */
+ time_inc += (MAX_DNS_TTL_AT_EXIT / 4);
} while (total_bytes_removed < min_remove_bytes);
return total_bytes_removed;