Send payloads one by one

PiperOrigin-RevId: 568988147
This commit is contained in:
Guogang Li
2023-09-27 16:08:37 -07:00
committed by Copybara-Service
parent a1a442c8eb
commit d095f505d3
@@ -702,6 +702,12 @@ winrt::fire_and_forget BluetoothClassicMedium::DeviceWatcher_Removed(
::winrt::Windows::Devices::Bluetooth::BluetoothDevice::FromIdAsync(
device_update_info.Id())
.get();
if (native_bluetooth_device == nullptr) {
NEARBY_LOGS(WARNING) << __func__ << ": cannot get native bluetooth device.";
return winrt::fire_and_forget();
}
std::string mac_address =
uint64_to_mac_address_string(native_bluetooth_device.BluetoothAddress());
auto it = mac_address_to_bluetooth_device_map_.find(mac_address);