summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-05-19 12:24:36 +0200
committercyBerta <cyberta@riseup.net>2022-05-19 12:24:36 +0200
commit8b0a78e9b6691436d6facbb224d8bab7972ab775 (patch)
treef27333868a8c2af47295ccb2cfa5c18fe6a3be60 /app/src/main/java
parent483fce1c76b991d7ae1a5c2434876cb2fc90a98f (diff)
reset http proxy port immediately after tor has been cancelled and is about to be shutdown
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java3
1 files changed, 2 insertions, 1 deletions
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();
}
}