Unverified Commit e5be0394 authored by teor's avatar teor
Browse files

Merge remote-tracking branch 'tor-github/pr/1034' into maint-0.3.5

parents f65f4b5c 37aae239
o Minor bugfixes (out-of-memory handler):
- When purging the DNS cache because of an out-of-memory condition,
try purging just the older entries at first. Previously, we would
purge the whole thing. Fixes bug 29617; bugfix on
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment