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 classic connection event filtering #65

Merged
merged 3 commits into from
Nov 9, 2022

Conversation

barbibulle
Copy link
Collaborator

A previous commit broke await device.connect() for Classic connections when an address was passed that wasn't correctly set to PUBLIC. Since BR/EDR addresses can't be random or private, this PR forces the address type used in the comparison when filtering for connections in the event handler.

@uael
Copy link
Contributor

uael commented Nov 9, 2022

Isn't it better to raise a value error in this case?

@uael
Copy link
Contributor

uael commented Nov 9, 2022

And add a way to convert an address before calling connect ?

@barbibulle
Copy link
Collaborator Author

Isn't it better to raise a value error in this case?

Good point. I modified the PR to only set the type explicitly when the address is passed as a string.

@uael uael self-requested a review November 9, 2022 21:58
@barbibulle barbibulle merged commit ee54df2 into main Nov 9, 2022
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.

None yet

2 participants