mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-08 06:46:11 +00:00
Addresses review on #812. Both findings are the same mistake: the route was sampled at a moment that need not match the request it governs. The gate was checked once, before a route wait that can last a minute. Start with Tor selected, disable it during the wait, and the request goes direct having consulted only the Tor deadline -- contacting a direct IP whose own cooldown is still running. The gate is now re-evaluated after the wait, when the route the request will take is finally known. The cooldown was likewise recorded against the mode selected when the response arrived, not the one the call was made on. Changing the setting mid-flight filed it in the wrong bucket, freeing the limited route and suppressing the newly selected one. The route is now sampled immediately before each attempt and reused for that attempt's response and its retry decision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>