From a78053408235d916b631da6aba1be42dd1fa630a Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 15 Feb 2016 20:24:11 +0100 Subject: [PATCH] Try to workaround handover fail https://code.google.com/p/android/issues/detail?id=62410 --- app/src/main/java/eu/faircode/netguard/SinkholeService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/netguard/SinkholeService.java b/app/src/main/java/eu/faircode/netguard/SinkholeService.java index 0c1ee675..7b6941d5 100644 --- a/app/src/main/java/eu/faircode/netguard/SinkholeService.java +++ b/app/src/main/java/eu/faircode/netguard/SinkholeService.java @@ -376,6 +376,10 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS if (prev != null && vpn == null) { Log.w(TAG, "Handover failed"); stopVPN(prev); + try { + Thread.sleep(3000); + } catch (InterruptedException ignored) { + } prev = null; vpn = startVPN(listAllowed); if (vpn == null)