summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-07-16 11:14:37 +0200
committercyBerta <cyberta@riseup.net>2022-07-19 00:06:16 +0200
commit71ee3eaea9bb3ff197ec36bc3684f2db33f7944c (patch)
tree3df303dfac48f04174d28029705a1346f0e1ed6a /app/src/main/java/se/leap
parent5217b70a52b6eed02b4ea73a702831afd0fe1711 (diff)
better naming for network error handling flag in ObfsVpnClient
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java
index 76e361d7..f6c8837e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java
+++ b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java
@@ -20,7 +20,7 @@ public class ObfsVpnClient implements Observer, client.EventLogger {
private static final String TAG = ObfsVpnClient.class.getSimpleName();
private volatile boolean noNetwork;
- private final AtomicBoolean isErrorHandling = new AtomicBoolean(false);
+ private final AtomicBoolean pendingNetworkErrorHandling = new AtomicBoolean(false);
private final AtomicInteger reconnectRetry = new AtomicInteger(0);
private static final int MAX_RETRY = 5;
@@ -72,7 +72,7 @@ public class ObfsVpnClient implements Observer, client.EventLogger {
VpnStatus.logDebug("[obfsvpn] reconnecting on different port... " + SOCKS_PORT.get());
startSync();
} else if (noNetwork) {
- isErrorHandling.set(true);
+ pendingNetworkErrorHandling.set(true);
}
}
}
@@ -89,7 +89,7 @@ public class ObfsVpnClient implements Observer, client.EventLogger {
e.printStackTrace();
VpnStatus.logError("[obfsvpn] " + e.getLocalizedMessage());
}
- isErrorHandling.set(false);
+ pendingNetworkErrorHandling.set(false);
Log.d(TAG, "stopping obfsVpnClient releasing LOCK ...");
}
}
@@ -106,7 +106,7 @@ public class ObfsVpnClient implements Observer, client.EventLogger {
noNetwork = true;
} else {
noNetwork = false;
- if (isErrorHandling.getAndSet(false)) {
+ if (pendingNetworkErrorHandling.getAndSet(false)) {
stop();
start();
}