From 8b0a78e9b6691436d6facbb224d8bab7972ab775 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 19 May 2022 12:24:36 +0200 Subject: reset http proxy port immediately after tor has been cancelled and is about to be shutdown --- app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java b/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java index 54868549..239bd528 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java +++ b/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java @@ -178,7 +178,6 @@ public class TorStatusObservable extends Observable { if (getInstance().status == TorStatus.OFF) { getInstance().torNotificationManager.cancelNotifications(context); getInstance().cancelled = false; - getInstance().port = -1; } else { if (logKey != null) { getInstance().lastTorLog = getStringFor(context, logKey); @@ -280,6 +279,8 @@ public class TorStatusObservable extends Observable { public static void markCancelled() { if (!getInstance().cancelled) { getInstance().cancelled = true; + getInstance().port = -1; + getInstance().setChanged(); getInstance().notifyObservers(); } } -- cgit v1.2.3