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: check more often for a device to reappear after the adapter runs out of slots #100

Merged
merged 15 commits into from
Jul 25, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jul 24, 2023

If the adapter ran out of slots we could overrun the timeout waiting for it to reappear.

Sometimes there is nothing we can do but checking more frequently is better than failing

replaces the sleep wait a poll loop to see when the device comes back

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage: 70.58% and project coverage change: -0.32% ⚠️

Comparison is base (beee26f) 78.52% compared to head (fbd4ddf) 78.20%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   78.52%   78.20%   -0.32%     
==========================================
  Files           4        4              
  Lines         419      445      +26     
  Branches       95      104       +9     
==========================================
+ Hits          329      348      +19     
- Misses         61       65       +4     
- Partials       29       32       +3     
Files Changed Coverage Δ
src/bleak_retry_connector/bluez.py 80.44% <62.50%> (-0.93%) ⬇️
src/bleak_retry_connector/__init__.py 77.55% <90.00%> (+0.06%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco changed the title fix: improve debug logging when device removed from bus fix: check more often for a device to reappear after the adapter runs out of slots Jul 24, 2023
@bdraco
Copy link
Member Author

bdraco commented Jul 25, 2023

This works better but need to add more tests and beat it up a bit more with keep 4 HK pairing connections open and than hitting all the switch bots

@bdraco bdraco marked this pull request as ready for review July 25, 2023 16:30
@bdraco bdraco merged commit 4c9c9c0 into main Jul 25, 2023
5 of 7 checks passed
@bdraco bdraco deleted the bus branch July 25, 2023 16:30
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.

1 participant