From 1c33dde81afdbbdb51f35c7988d45a9ba9f507f7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 1 Apr 2026 13:09:22 +0000 Subject: [PATCH] fix: restore service.stop() on explicit Tor OFF for safety MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users in restrictive countries need Tor circuits torn down when they switch to OFF — an idle proxy still maintains detectable connections. stop() is now called only on explicit OFF toggle (user action), not on flow pause/resume (app lifecycle). This avoids file lock races on resume while ensuring OFF truly disconnects from the Tor network. https://claude.ai/code/session_01BApgDd5udqBzMqysSRMpZu --- .../main/java/com/vitorpamplona/amethyst/ui/tor/TorManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/tor/TorManager.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/tor/TorManager.kt index aa9538424..57af3e845 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/tor/TorManager.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/tor/TorManager.kt @@ -63,6 +63,7 @@ class TorManager( } TorType.OFF -> { + service.stop() emit(TorServiceStatus.Off) }