summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2018-04-23 12:46:30 -0700
committerEtan Cohen <etancohen@google.com>2018-04-23 12:51:19 -0700
commit3332ed7296f9f4522b98d3feaf6f385c4cc84437 (patch)
tree9b2ea693b419a75064df193970c222db13c3ad81
parent6db951c2edfe94efa55e836ac2e74d768a22b872 (diff)
[AWARE] Failure to release network requests can lead to further failures
Fix failure observed during stress tests: if a data-path is terminated due to remote operation (one side always finishes first) then it may causes cascaded failures. The behavior is due to a failure to clear out the cache from previous requests. The framework checks to see whether a request can be released, it should not be released if: - An agent exists, 'unwanted' will be called on the agent - Or an NDP was created (even if an agent doesn't exist), should first terminate the NDP But otherwise the request should be cleared from the cache - and it wasn't. Bug: 73896170 Test: DataPathTest, DataPathStressTest (and observed failure which weren't cascading) Change-Id: I1caa8998f071426dfb3e218ed113f4bb3f2a8cff
-rw-r--r--service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java
index c6b1ae8d2..53d399e21 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java
@@ -850,6 +850,8 @@ public class WifiAwareDataPathStateManager {
if (VDBG) Log.v(TAG, "releaseNetworkFor: in progress NDP being terminated");
mMgr.endDataPath(nnri.ndpId);
nnri.state = AwareNetworkRequestInformation.STATE_TERMINATING;
+ } else {
+ mNetworkRequestsCache.remove(networkSpecifier);
}
} else {
if (VDBG) {