-
-
Notifications
You must be signed in to change notification settings - Fork 2
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: increase backoff when local ble adapter runs out of connection slots #67
Conversation
Codecov ReportBase: 85.57% // Head: 85.38% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
==========================================
- Coverage 85.57% 85.38% -0.19%
==========================================
Files 2 2
Lines 298 301 +3
Branches 73 74 +1
==========================================
+ Hits 255 257 +2
- Misses 30 31 +1
Partials 13 13
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
In Bluetooth-Devices/bleak-retry-connector#67 we discovered that most of the CSR adapters only have 5 connection slots so we want to reduce the chance we will not be able to make a connection because we are still holding the connection to another switchbot. We still hold the connection for 8.5 seconds every time they do an action to ensure if they want to turn on a light and change a color the whole action happens in a single connection.
In testing it was found that most of the CSR adapters only support 5 slots and the broadcom only support 7 slots.
When they run out of slots the device they are trying to connect to disappears from the bus so we must backoff