diff options
author | Junyu Lai <junyulai@google.com> | 2019-05-09 18:53:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-05-09 18:53:03 +0000 |
commit | 8e63c9cc01ffaa1c0929c45569dabbd6b788f0da (patch) | |
tree | ac7e0388d1885b2936311e19e29d0b06170d2db0 | |
parent | 3e6a8c1c0e0a26611f8bbbeb8524179dcbef4a3a (diff) | |
parent | 5d7bb8b456b2bef8eb177565d283c3b48d9e54fb (diff) |
Merge "Clean up the keepalive slots when network disconnect"
-rw-r--r-- | services/core/java/com/android/server/connectivity/KeepaliveTracker.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java index bde430cc297f..84887bdb2dbf 100644 --- a/services/core/java/com/android/server/connectivity/KeepaliveTracker.java +++ b/services/core/java/com/android/server/connectivity/KeepaliveTracker.java @@ -496,10 +496,11 @@ public class KeepaliveTracker { if (networkKeepalives != null) { for (KeepaliveInfo ki : networkKeepalives.values()) { ki.stop(reason); + // Clean up keepalives since the network agent is disconnected and unable to pass + // back asynchronous result of stop(). + cleanupStoppedKeepalive(nai, ki.mSlot); } } - // Clean up keepalives will be done as a result of calling ki.stop() after the slots are - // freed. } public void handleStopKeepalive(NetworkAgentInfo nai, int slot, int reason) { |