mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-07 23:32:56 +00:00
Guarantee native stop
This commit is contained in:
parent
bab4790ef7
commit
e58d4c3d4b
1 changed files with 7 additions and 1 deletions
|
@ -1129,7 +1129,13 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
|
||||
private void stopNative(ParcelFileDescriptor vpn, boolean clear) {
|
||||
Log.i(TAG, "Stop native clear=" + clear);
|
||||
jni_stop(vpn.getFd(), clear);
|
||||
try {
|
||||
jni_stop(vpn.getFd(), clear);
|
||||
} catch (Throwable ex) {
|
||||
// File descriptor might be closed
|
||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||
jni_stop(-1, clear);
|
||||
}
|
||||
}
|
||||
|
||||
private void unprepare() {
|
||||
|
|
Loading…
Reference in a new issue