Skip to content

Remove the reconnect refusal window - #104

Merged
ps2 merged 1 commit into
next-devfrom
fix/remove-reconnect-refusal-window
Oct 31, 2026
Merged

ps2 merged 1 commit into
next-devfrom
fix/remove-reconnect-refusal-window

Conversation

@ps2

@ps2 ps2 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

#103 was merged before I could pull one part of it back out. This removes the reconnect refusal window that came in with e993611; the start-delay reconnect from #103 stays.

The refusal window treated a connect failure within 2 s of lodging the delayed reconnect as CoreBluetooth refusing the request. In that case it waited 30 s and rescanned instead of reconnecting. With this change, a failure on the active peripheral lodges the start-delay reconnect again, as it does for every other disconnect.

Unchanged from #103:

  • the 30 s CBConnectPeripheralOptionStartDelayKey reconnect, in whole seconds;
  • reconnects logged to the device log;
  • the 2 s rescan for a peripheral that isn't the active one.

Builds for iOS and watchOS.

A connect failure within 2 s of lodging the delayed reconnect backed
off for 30 s and rescanned instead of reconnecting. Drop that branch;
every failure now lodges the start-delay reconnect again. The
start-delay reconnect itself is unchanged.
@ps2
ps2 marked this pull request as ready for review October 31, 2026 23:29
@ps2
ps2 merged commit ce9c671 into next-dev Oct 31, 2026
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