From c0c5b2b94f5d555a271fa8b8278f5eb6a624e714 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 11 Feb 2016 15:01:23 +0100 Subject: [PATCH] Check if reload succeeded --- app/src/main/java/eu/faircode/netguard/SinkholeService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/SinkholeService.java b/app/src/main/java/eu/faircode/netguard/SinkholeService.java index d796c4b7..98e22cbe 100644 --- a/app/src/main/java/eu/faircode/netguard/SinkholeService.java +++ b/app/src/main/java/eu/faircode/netguard/SinkholeService.java @@ -421,6 +421,9 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS stopNative(prev, false); stopVPN(prev); } + if (vpn == null) + throw new IllegalStateException("VPN start failed"); + startNative(vpn, listAllowed); }