summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/tor/ClientTransportPlugin.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/ClientTransportPlugin.java b/app/src/main/java/se/leap/bitmaskclient/tor/ClientTransportPlugin.java
index 0b481780..59c1290a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/tor/ClientTransportPlugin.java
+++ b/app/src/main/java/se/leap/bitmaskclient/tor/ClientTransportPlugin.java
@@ -113,13 +113,16 @@ public class ClientTransportPlugin implements ClientTransportPluginInterface {
@Override
public void stop() {
IPtProxy.stopSnowflake();
- try {
+ try {
TorStatusObservable.waitUntil(this::isSnowflakeOff, 10);
} catch (InterruptedException | TimeoutException e) {
e.printStackTrace();
}
snowflakePort = -1;
- logFileObserver.stopWatching();
+ if (logFileObserver != null) {
+ logFileObserver.stopWatching();
+ logFileObserver = null;
+ }
}
private boolean isSnowflakeOff() {