diff options
| author | 2022-11-03 12:35:12 +0000 | |
|---|---|---|
| committer | 2022-11-03 12:35:12 +0000 | |
| commit | 78b6cfbe4da9aedfb8bfccaaa8e86b0abd85843b (patch) | |
| tree | 6f1a295671f4a73bd1327aa707b1b979caf6cb50 | |
| parent | 79605eb99412d26f63856d59bb559cb2d8078551 (diff) | |
| parent | 849bbda37d4a37530d284e7ef8006eccfacd99e2 (diff) | |
Merge "Fix VPN retry timer mechanism"
| -rw-r--r-- | services/core/java/com/android/server/connectivity/Vpn.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index c671a2c0cdad..6a000d9f96cf 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -2928,7 +2928,6 @@ public class Vpn { ikeConfiguration.isIkeExtensionEnabled( IkeSessionConfiguration.EXTENSION_TYPE_MOBIKE); onIkeConnectionInfoChanged(token, ikeConfiguration.getIkeSessionConnectionInfo()); - mRetryCount = 0; } /** @@ -3048,6 +3047,7 @@ public class Vpn { } doSendLinkProperties(networkAgent, lp); + mRetryCount = 0; } catch (Exception e) { Log.d(TAG, "Error in ChildOpened for token " + token, e); onSessionLost(token, e); @@ -3345,6 +3345,10 @@ public class Vpn { } private void scheduleRetryNewIkeSession() { + if (mScheduledHandleRetryIkeSessionFuture != null) { + Log.d(TAG, "There is a pending retrying task, skip the new retrying task"); + return; + } final long retryDelay = mDeps.getNextRetryDelaySeconds(mRetryCount++); Log.d(TAG, "Retry new IKE session after " + retryDelay + " seconds."); // If the default network is lost during the retry delay, the mActiveNetwork will be |