diff options
author | cyBerta <cyberta@riseup.net> | 2022-07-16 11:14:37 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-07-19 00:06:16 +0200 |
commit | 71ee3eaea9bb3ff197ec36bc3684f2db33f7944c (patch) | |
tree | 3df303dfac48f04174d28029705a1346f0e1ed6a /app/src/main/java/se | |
parent | 5217b70a52b6eed02b4ea73a702831afd0fe1711 (diff) |
better naming for network error handling flag in ObfsVpnClient
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ObfsVpnClient.java | 8 |
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(); } |