Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: corebluetooth fulfill characteristics futures on peripheral disconnection #409

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

szymonlesisz
Copy link
Contributor

Fixing corebluetooth pending subscription features.

Im trying to connect to a peripheral which requires number comparison pairing.
To enforce pairing process i need to call subscribe, read or write on protected characteristic, this will open native system window and display numbers to compare.

If everything goes well then i receive OK on the subscription.
However if i cancel the system number comparison or disconnect the device during that process i will get DeviceDisconnected event but those pending subscription requests are never resolved.

With this fix they should be fulfilled with "Device disconnected" error

@szymonlesisz szymonlesisz changed the title fix: corebluetooth fulfill characteristics futures on peripheral di… fix: corebluetooth fulfill characteristics futures on peripheral disconnection Nov 18, 2024
@qwandor qwandor merged commit 5f64e11 into deviceplug:dev Nov 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants