Skip to content

Commit

Permalink
Fix #227, use BluetoothCacheMode::Uncached when discovering services for
Browse files Browse the repository at this point in the history
device
  • Loading branch information
Bradley Cooley authored and qdot committed Dec 21, 2024
1 parent f7bd8d2 commit 6c4759d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/winrtble/ble/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl BLEDevice {

pub async fn discover_services(&mut self) -> Result<&[GattDeviceService]> {
let winrt_error = |e| Error::Other(format!("{:?}", e).into());
let service_result = self.get_gatt_services(BluetoothCacheMode::Cached).await?;
let service_result = self.get_gatt_services(BluetoothCacheMode::Uncached).await?;
let status = service_result.Status().map_err(winrt_error)?;
if status == GattCommunicationStatus::Success {
// We need to convert the IVectorView to a Vec, because IVectorView is not Send and so
Expand Down

0 comments on commit 6c4759d

Please sign in to comment.