diff options
author | Erik Kline <ek@google.com> | 2018-05-10 06:03:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-10 06:03:18 +0000 |
commit | 9d83a9f592ba146ddb328d0415e067504f221b96 (patch) | |
tree | 7826b7e44f97cff170da72f160a22ce18b9f3b82 /service | |
parent | 80ebad276ca738aa5c395f1354ebe6db64e5ae9e (diff) | |
parent | 4dee5fb135b11e155c81fc6defe6c57a583c5d81 (diff) |
Merge "Also await IpClient's shutdown" into pi-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 9dea956f2..f8f1ff3ce 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -3735,7 +3735,12 @@ public class WifiStateMachine extends StateMachine { mIsRunning = false; updateBatteryWorkSource(null); - if (mIpClient != null) mIpClient.shutdown(); + if (mIpClient != null) { + mIpClient.shutdown(); + // Block to make sure IpClient has really shut down, lest cleanup + // race with, say, bringup code over in tethering. + mIpClient.awaitShutdown(); + } mNetworkInfo.setIsAvailable(false); if (mNetworkAgent != null) mNetworkAgent.sendNetworkInfo(mNetworkInfo); mCountryCode.setReadyForChange(false); |