android: Change to CONNECTING state if CHILD_SA goes down

Unless we are disconnecting.  This currently triggers the connecting
dialog, perhaps just updating the status text would do too (when switching
from CONNECTED to CONNECTING, not from DISCONNECTED to CONNECTING).
This commit is contained in:
Tobias Brunner 2014-07-14 15:06:40 +02:00
parent 94124456f2
commit 1435bd2e1b
1 changed files with 4 additions and 1 deletions

View File

@ -354,7 +354,10 @@ public class CharonVpnService extends VpnService implements Runnable
switch (status)
{
case STATE_CHILD_SA_DOWN:
/* we ignore this as we use closeaction=restart */
if (!mIsDisconnecting)
{
setState(State.CONNECTING);
}
break;
case STATE_CHILD_SA_UP:
setState(State.CONNECTED);