Skip to content
Snippets Groups Projects
Commit 3e2850f8 authored by cyberta's avatar cyberta
Browse files

update VPN state to 'NOPROCESS' (not running) if starting obfsvpn fails while...

update VPN state to 'NOPROCESS' (not running) if starting obfsvpn fails while trying to establish an obfuscated connection
parent e2d7b1a2
Branches
Tags
1 merge request!349improve state handling of obfsvpn
Pipeline #276482 passed with warnings
......@@ -382,6 +382,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
if (!stopObfsvpn()) {
VpnStatus.logError("Failed to stop already running obfsvpn client");
endVpnService();
VpnStatus.updateStateString("NOPROCESS", "VPN STOPPED", R.string.state_noprocess, ConnectionStatus.LEVEL_NOTCONNECTED);
return;
}
......@@ -404,6 +405,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
e.printStackTrace();
VpnStatus.logException(e);
endVpnService();
VpnStatus.updateStateString("NOPROCESS", "VPN STOPPED", R.string.state_noprocess, ConnectionStatus.LEVEL_NOTCONNECTED);
return;
}
}
......@@ -416,6 +418,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
} catch (IOException e) {
VpnStatus.logException("Error writing config file", e);
endVpnService();
VpnStatus.updateStateString("NOPROCESS", "VPN STOPPED", R.string.state_noprocess, ConnectionStatus.LEVEL_NOTCONNECTED);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment