Skip to content

Commit

Permalink
Fix propagation of CoreBluetooth errors
Browse files Browse the repository at this point in the history
Errors from CBPeripeheralDelegate calls were being raised in the asyncio
event loop, but not in the correct task. In order to reach the user's
code, the error has to be passed through the event to the user call that
is awaiting the event.

Without these changes, e.g. ATT errors sent by the peripheral caused
error messages to be printed, but since the event that the user's call
was waiting on was never set, the user's code was blocked.

The implementation was adapted from #209
  • Loading branch information
Risto Toijala authored and Risto Toijala committed Jun 2, 2021
1 parent 0758552 commit 01f597d
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 115 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Fixed
* Fixed BleakClientBlueZDBus.pair() method always returning True. Fixes #503.
* Fixed waiting for notification start/stop to complete in CoreBluetooth backend.
* Fixed write without response on BlueZ < 5.51.
* Fixed error propagation for CoreBluetooth events


`0.11.0`_ (2021-03-17)
Expand Down
Loading

0 comments on commit 01f597d

Please sign in to comment.