summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/VPNProfileList.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java b/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java
index dbcb13fc..6add8ae0 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/LogFileHandler.java
@@ -136,7 +136,7 @@ class LogFileHandler extends Handler {
readCacheContents(new FileInputStream(logfile));
- } catch (java.io.IOException | java.lang.RuntimeException e) {
+ } catch (java.io.IOException | java.lang.RuntimeException e ) {
VpnStatus.logError("Reading cached logfile failed");
VpnStatus.logException(e);
e.printStackTrace();
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/VPNProfileList.java b/main/src/main/java/de/blinkt/openvpn/fragments/VPNProfileList.java
index 0323ba76..c3763334 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/VPNProfileList.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/VPNProfileList.java
@@ -112,7 +112,7 @@ public class VPNProfileList extends ListFragment implements OnClickListener, Vpn
}
private void startOrStopVPN(VpnProfile profile) {
- if (VpnStatus.isVPNActive()) {
+ if (VpnStatus.isVPNActive() && ProfileManager.getLastConnectedVpn() == profile) {
Intent disconnectVPN = new Intent(getActivity(), DisconnectVPN.class);
startActivity(disconnectVPN);
} else {