ios: nearbyConnections: Fixes the issue that can't Advertise and Discover for WifiLan.

- The local WifilanSocket and WifilanService is local variable which will be invalid if out of scope. Move them to the member and let the WifiLanMedium control the life scope.

PiperOrigin-RevId: 393133266
This commit is contained in:
edwinwu
2021-08-26 08:47:32 -07:00
committed by Copybara-Service
parent 81b72ab1bf
commit 0232b47e02
+1 -1
View File
@@ -553,7 +553,7 @@ bool P2pClusterPcpHandler::IsRecognizedWifiLanEndpoint(
}
ByteArray expected_service_id_hash =
GenerateHash(service_id, BluetoothDeviceName::kServiceIdHashLength);
GenerateHash(service_id, WifiLanServiceInfo::kServiceIdHashLength);
if (service_info.GetServiceIdHash() != expected_service_id_hash) {
NEARBY_LOGS(INFO)