From e7395b411c9e50067c59dcadfc8d922855bef96d Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 19 May 2022 13:21:23 +0200 Subject: use better check if tor is running on vpn certificate update error handling --- .../java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/src') diff --git a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java index 63b24ea2..3ec04f32 100644 --- a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java +++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java @@ -25,7 +25,6 @@ import android.util.Pair; import org.json.JSONException; import org.json.JSONObject; -import java.io.IOException; import java.net.URL; import java.util.List; import java.util.concurrent.TimeoutException; @@ -204,7 +203,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { VpnStatus.logDebug("[API] VPN CERT: " + certString); } if (ConfigHelper.checkErroneousDownload(certString)) { - if (TorStatusObservable.getStatus() != OFF && TorStatusObservable.getProxyPort() != -1) { + if (TorStatusObservable.isRunning()) { setErrorResult(result, downloading_vpn_certificate_failed, null); } else if (certString == null || certString.isEmpty() ){ // probably 204 -- cgit v1.2.3