diff options
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 bca20e43d..0b0210bee 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); |