Skip to content

Commit

Permalink
winrt/client: change get services retry cache mode
Browse files Browse the repository at this point in the history
This changes the cache mode when getting services after a ServicesChanged
event in the WinRT backend. This matches the recommendation of the docs.

https://learn.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.bluetoothledevice.gattserviceschanged?view=winrt-20348
  • Loading branch information
dlech committed Oct 31, 2022
1 parent 359e9b0 commit 50057cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0
Fixed
------
* Fixed crash when getting services in WinRT backend.
* Fixed cache mode when retrying get services in WinRT backend.

`0.19.1`_ (2022-10-29)
======================
Expand Down
2 changes: 1 addition & 1 deletion bleak/backends/winrt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ async def get_services():
"%s: restarting get services due to services changed event",
self.address,
)
args = [BluetoothCacheMode.UNCACHED]
args = [BluetoothCacheMode.CACHED]

services: Sequence[GattDeviceService] = _ensure_success(
get_services_task.result(),
Expand Down

0 comments on commit 50057cc

Please sign in to comment.