diff options
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 2 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnService.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index fb759104..0dc5a871 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -297,7 +297,7 @@ public class OpenVPN { private static int getLevel(String state){ String[] noreplyet = {"CONNECTING","WAIT", "RECONNECTING", "RESOLVE", "TCP_CONNECT"}; - String[] reply = {"AUTH","GETCONFIG","ASSIGN_IP","ADD_ROUTES"}; + String[] reply = {"AUTH","GET_CONFIG","ASSIGN_IP","ADD_ROUTES"}; String[] connected = {"CONNECTED"}; String[] notconnected = {"DISCONNECTED", "EXITING"}; diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index 66ab9e30..cecae9d1 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -114,15 +114,16 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac private void endVpnService() { mProcessThread=null; OpenVPN.logBuilderConfig(null); - OpenVPN.removeStateListener(this); OpenVPN.removeByteCountListener(this); unregisterNetworkStateReceiver(); ProfileManager.setConntectedVpnProfileDisconnected(this); if(!mStarting) { stopForeground(!mNotificationalwaysVisible); - if( !mNotificationalwaysVisible) + if( !mNotificationalwaysVisible) { stopSelf(); + OpenVPN.removeStateListener(this); + } } } @@ -351,6 +352,8 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac if (mNetworkStateReceiver!= null) { this.unregisterReceiver(mNetworkStateReceiver); } + // Just in case unregister for state + OpenVPN.removeStateListener(this); } |