Skip to content

Simple connection limiter that closes connections cleanly

akwizgran requested to merge 1712-simple-connection-limiter into master

This MR is a simple alternative to !1250 (closed) that closes Bluetooth connections cleanly when key agreement starts, but apart from that doesn't try to impose a connection limit.

During testing I was surprised to find that this branch (plus !1251 (merged)) seemed to perform as well as !1250 (closed) (plus !1251 (merged)). In both cases, the presence of the Moto E3 with its flaky Bluetooth stack would cause issues for other devices. But it wasn't clear that the connection limiting logic in !1250 (closed) helped the other devices to cope with those issues.

The only way I could prevent the E3 from causing problems was to keep the connection limiting parameters very conservative, so that the E3 rarely tried to make more than one connection at a time. But this meant the other devices took a long time to detect their full capacity. In contrast, this branch allowed all the devices to use their full capacity straight away, at the cost of tolerating more disruption from the E3. When the E3 wasn't present this was a clear win, and when it was present there wasn't a clear advantage either way.

!1250 (closed) and !1251 (merged) are based on this branch, so we can safely merge them before doing further testing.

Closes #1712 (closed)

Merge request reports