Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Changed

Fixed
-----
* Fixed potential race condition causing timeout while connecting in WinRT backend.
* Fixed file handle leak in BlueZ backend when D-Bus connection is lost and re-established.
* Fixed crash in CoreBluetooth backend if an ObjC delegate callback is called after the asyncio run loop stops.
* Fixed possible deadlock when starting scanning on Windows when Bluetooth is turned off.
Expand Down
14 changes: 7 additions & 7 deletions bleak/backends/winrt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,20 +360,20 @@ def max_pdu_size_changed_handler(sender: GattSession, args: Object) -> None:
)
)

# If the session is already active, we need to set the event since
# the session_status_changed event won't fire. This happens, e.g.,
# when pairing before connecting which causes the device to already
# be connected.
if self._session.session_status == GattSessionStatus.ACTIVE:
event.set()

self._max_pdu_size_changed_token = self._session.add_max_pdu_size_changed(
max_pdu_size_changed_handler
)

services_changed_event = asyncio.Event()
self._services_changed_events.append(services_changed_event)

# If the session is already active, we need to set the event since
# the session_status_changed event won't fire. This happens, e.g.,
# when pairing before connecting which causes the device to already
# be connected.
if self._session.session_status == GattSessionStatus.ACTIVE:
event.set()

try:
# Windows does not support explicitly connecting to a device.
# Instead it has the concept of a GATT session that is owned
Expand Down
Loading