TunnelDetailFragment now restores state correctly after process death
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
62d8beff96
commit
9652fe99df
@@ -240,10 +240,13 @@ public final class GoBackend implements Backend {
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
for (final Tunnel tunnel : Application.getTunnelManager().getTunnels()) {
|
||||
if (tunnel != null && tunnel.getState() != State.DOWN)
|
||||
tunnel.setState(State.DOWN);
|
||||
}
|
||||
Application.getTunnelManager().getTunnels().thenAccept(tunnels -> {
|
||||
for (final Tunnel tunnel : tunnels) {
|
||||
if (tunnel != null && tunnel.getState() != State.DOWN)
|
||||
tunnel.setState(State.DOWN);
|
||||
}
|
||||
});
|
||||
|
||||
vpnService = vpnService.newIncompleteFuture();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user