summaryrefslogtreecommitdiff
path: root/src/de
diff options
context:
space:
mode:
Diffstat (limited to 'src/de')
-rw-r--r--src/de/blinkt/openvpn/OpenVpnService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java
index c73a1556..241bf774 100644
--- a/src/de/blinkt/openvpn/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/OpenVpnService.java
@@ -233,14 +233,14 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
}
- void registerNetworkStateReceiver(OpenVPNMangement magnagement) {
+ synchronized void registerNetworkStateReceiver(OpenVPNMangement magnagement) {
// Registers BroadcastReceiver to track network connection changes.
IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
mNetworkStateReceiver = new NetworkSateReceiver(magnagement);
this.registerReceiver(mNetworkStateReceiver, filter);
}
- void unregisterNetworkStateReceiver() {
+ synchronized void unregisterNetworkStateReceiver() {
if(mNetworkStateReceiver!=null)
this.unregisterReceiver(mNetworkStateReceiver);
mNetworkStateReceiver=null;