summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/de/blinkt/openvpn/core/OpenVpnService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/core/OpenVpnService.java b/src/de/blinkt/openvpn/core/OpenVpnService.java
index 53d4784b..1b25c28a 100644
--- a/src/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/core/OpenVpnService.java
@@ -232,7 +232,14 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
synchronized void unregisterNetworkStateReceiver() {
if(mNetworkStateReceiver!=null)
- this.unregisterReceiver(mNetworkStateReceiver);
+ try {
+ this.unregisterReceiver(mNetworkStateReceiver);
+ } catch (IllegalArgumentException iae) {
+ // I don't know why this happens:
+ // java.lang.IllegalArgumentException: Receiver not registered: de.blinkt.openvpn.NetworkSateReceiver@41a61a10
+ // Ignore for now ...
+ iae.printStackTrace();
+ }
mNetworkStateReceiver=null;
}