mirror of
https://github.com/M66B/NetGuard.git
synced 2025-03-15 08:29:02 +00:00
Handle race condition with outher VPN solutions
This commit is contained in:
parent
14b0aea105
commit
b533b2c98a
1 changed files with 3 additions and 1 deletions
|
@ -109,6 +109,8 @@ public class SinkholeService extends VpnService {
|
|||
vpn = startVPN();
|
||||
startDebug(vpn);
|
||||
}
|
||||
if (vpn == null)
|
||||
prefs.edit().putBoolean("enabled", false).apply();
|
||||
removeDisabledNotification();
|
||||
Widget.updateWidgets(SinkholeService.this);
|
||||
break;
|
||||
|
@ -209,7 +211,7 @@ public class SinkholeService extends VpnService {
|
|||
}
|
||||
|
||||
private void startDebug(final ParcelFileDescriptor pfd) {
|
||||
if (!debug)
|
||||
if (pfd == null || !debug)
|
||||
return;
|
||||
|
||||
thread = new Thread(new Runnable() {
|
||||
|
|
Loading…
Add table
Reference in a new issue