diff options
-rw-r--r-- | wifi/java/android/net/wifi/p2p/WifiP2pService.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index ef57e63..ca329e6 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1662,7 +1662,6 @@ public class WifiP2pService extends IWifiP2pManager.Stub { private void stopDhcpServer(String intf) { try { mNwService.stopTethering(); - mNwService.clearInterfaceAddresses(intf); } catch (Exception e) { loge("Error stopping Dhcp server" + e); return; @@ -2166,6 +2165,13 @@ public class WifiP2pService extends IWifiP2pManager.Stub { mDhcpStateMachine = null; } + try { + mNwService.clearInterfaceAddresses(mGroup.getInterface()); + } catch (Exception e) { + loge("Failed to clear addresses " + e); + } + NetworkUtils.resetConnections(mGroup.getInterface(), NetworkUtils.RESET_ALL_ADDRESSES); + mGroup = null; mWifiNative.p2pFlush(); mServiceDiscReqId = null; |