summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-12-11 08:43:09 +0100
committercyBerta <cyberta@riseup.net>2018-12-11 08:43:09 +0100
commit4cf63d32d8b8770d366f39cd08e7f00f6a420f2b (patch)
tree1783bab601171b4675ea5b68454a7d06f2eed35a /app/src/main/java
parent34dcf703cad98d7571784b9d57f4aff89b42cf0d (diff)
fix UI state handling when the app tries to change the gateway
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java
index 8e6ae7a6..f17fe28e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java
@@ -67,7 +67,6 @@ class EipSetupObserver extends BroadcastReceiver implements VpnStatus.StateListe
updateIntentFilter.addAction(BROADCAST_PROVIDER_API_EVENT);
updateIntentFilter.addCategory(CATEGORY_DEFAULT);
LocalBroadcastManager.getInstance(context.getApplicationContext()).registerReceiver(this, updateIntentFilter);
- Log.d(TAG, "broadcast registered");
instance = this;
}
@@ -78,7 +77,7 @@ class EipSetupObserver extends BroadcastReceiver implements VpnStatus.StateListe
}
public static boolean reconnectingWithDifferentGateway() {
- return instance.reconnectTry.get() > 0;
+ return instance.setupNClosestGateway.get() > 0;
}
public static int connectionRetry() {
@@ -238,6 +237,7 @@ class EipSetupObserver extends BroadcastReceiver implements VpnStatus.StateListe
if ("CONNECTRETRY".equals(state) && LEVEL_CONNECTING_NO_SERVER_REPLY_YET.equals(level)) {
if (TIMEOUT.equals(logmessage)) {
Log.e(TAG, "Timeout reached! Try next gateway!");
+ VpnStatus.logError("Timeout reached! Try next gateway!");
selectNextGateway();
return;
}