Skip to content

Cap the reconnect backoff at 60s everywhere - #104

Merged
andrewchen5678 merged 4 commits into
mainfrom
ios-reconnect-backoff-cap
Sep 16, 2026
Merged

andrewchen5678 merged 4 commits into
mainfrom
ios-reconnect-backoff-cap

Conversation

@andrewchen5678

Copy link
Copy Markdown
Contributor

The 5 min reconnect cap introduced with the reconnect revamp waits too long
between attempts for every client, not just iOS: each probe is one bounded
connect on an endpoint the client already holds, so the extra minutes bought
almost nothing while delaying the notice of a server's return by that much.

This goes back to the single 60s cap the client had before the revamp —
one value for CLI, desktop and mobile alike — so the cfg(target_os = "ios")
split (and the test helper that took the cap as a parameter to cover both
caps) goes away with it.

Everything else in the policy is unchanged: doubling from 1s, jitter, retrying
the first attempt, the network/foreground wake, and the endpoint rebuild after
the third failure then at most every 30 minutes. Docs, FFI comments and
ios/flextunnel.h follow the value.

Also bumps the workspace to 0.0.80 for the release.

🤖 Generated with Claude Code

Andrew Chen and others added 4 commits September 15, 2026 18:36
The 5 min cap is sized for the CLI and desktop clients, which sit through
outages unattended for days. An iOS session is temporary by nature: it
lives only as long as the app, and the user who started it is typically
watching, so a wait of minutes between attempts reads as a hang rather
than saving anything. The iOS build keeps a 60s cap; everything else in
the policy (doubling series, jitter, foreground wake, rebuild gating) is
unchanged.

The backoff math takes the cap as a parameter so the unit test covers both
values from any host, and the docs and FFI comments state the iOS cap.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The 5 min cap waits too long between attempts for every client, not just
iOS: each probe is one bounded connect on an endpoint the client already
holds, so the minutes bought almost nothing while delaying the notice of
a server's return by that much. Go back to the single 60s cap this had
before the reconnect revamp — one cap for desktop, CLI and mobile alike,
so the platform split (and the test helper that took the cap as a
parameter to cover both) goes away with it.

Everything else in the policy is unchanged: the doubling series from 1s,
jitter, retrying the first attempt, the network/foreground wake, and the
endpoint rebuild after the third failure then at most every 30 minutes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The one-line description still described the client as a proxy only, which
has been half the story since forwards landed: a client can run with no
proxy listener at all and serve nothing but its declared port forwards. The
crate description, the CLI's --help line, the two crate-level docs and the
README's opening paragraph now name both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andrewchen5678
andrewchen5678 merged commit 25858bf into main Sep 16, 2026
4 checks passed
@andrewchen5678
andrewchen5678 deleted the ios-reconnect-backoff-cap branch September 16, 2026 02:35
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