Files
brave-core/net/proxy_resolution
Anthony Tseng bac6cbe258 Fix TorProxyMap using max-heap instead of min-heap for expiration (#34588)
ClearExpiredEntries() assumes queue_.top() returns the oldest entry,
but std::priority_queue defaults to a max-heap (std::less), so top()
returns the newest. This prevents older expired entries from being
cleaned up when newer entries exist, causing Tor circuit credentials
to persist beyond the intended 10-minute lifetime during multi-site
browsing.

Switch to std::greater to make it a min-heap and add a multi-site
regression test that exercises the staggered expiration scenario.
2026-03-10 16:30:14 +00:00
..