tunnel: do not keep service running when bringing tunnel down
Doing so causes the process to restart when the activity is cleared, even when no tunnel is running. I fear this might also lead to the current flurry of DeadSystemExceptions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
652971d746
commit
3907f6a4c1
@ -324,6 +324,9 @@ public final class GoBackend implements Backend {
|
||||
currentTunnelHandle = -1;
|
||||
currentConfig = null;
|
||||
wgTurnOff(handleToClose);
|
||||
try {
|
||||
vpnService.get(0, TimeUnit.NANOSECONDS).stopSelf();
|
||||
} catch (final TimeoutException ignored) { }
|
||||
}
|
||||
|
||||
tunnel.onStateChange(state);
|
||||
|
Loading…
Reference in New Issue
Block a user