mirror of https://github.com/M66B/NetGuard.git
Handle on destroy stop exceptions
This commit is contained in:
parent
e965043116
commit
977f15822c
|
@ -1121,11 +1121,16 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
|||
subscriptionsChangedListener = null;
|
||||
}
|
||||
|
||||
if (vpn != null) {
|
||||
jni_stop(vpn.getFd(), true);
|
||||
stopVPN(vpn);
|
||||
vpn = null;
|
||||
try {
|
||||
if (vpn != null) {
|
||||
jni_stop(vpn.getFd(), true);
|
||||
stopVPN(vpn);
|
||||
vpn = null;
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||
}
|
||||
|
||||
jni_done();
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
|
Loading…
Reference in New Issue