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

WinRT: check scanner for abort #1548

Merged
merged 2 commits into from
Apr 28, 2024
Merged

WinRT: check scanner for abort #1548

merged 2 commits into from
Apr 28, 2024

Conversation

dlech
Copy link
Collaborator

@dlech dlech commented Apr 28, 2024

This adds a check to give a useful error message instead of silently failing if Bluetooth is off.

It is not safe to start the scanner if it is already running. This adds
a check to ensure that the scanner is not already running before starting.
It will not raise an exception instead of resulting in undefined behavior.
If Bluetooth is off or not present, the status will be ABORTED. We can
use this to give a helpful error message.

Also wait some time for the status to change to STARTED before returning.

Fixes: #1535
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.

winrt: No advertisments received due to BluetoothLEAdvertisementWatcherStatus.ABORTED
1 participant