Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Fixes #47062 — the linked-issue check doesn't resolve the keyword from a fork PR, so referencing it here directly. |
The event-stream client retried on a fixed one-second delay no matter why the stream died, so an unauthenticated browser session re-triggered the Basic auth prompt every second. Streams that never connected successfully now scale the delay with the attempt count up to 30 seconds; streams that connected and later dropped keep the existing one-second retry.
b4e64bf to
309fec8
Compare
|
Rebased onto the latest |
|
Following up after the rebase — no checks have run on the new head, so the workflows may need a maintainer approval to kick off. Behavior is unchanged from the original backoff fix (capped retry scaling for never-connected streams, 1s retry kept for post-connect drops). Happy to rework anything if review turns something up. |
|
I think you unintentionally closed this PR @holny |
|
Superseded by #48161 - this PR's head fork was accidentally deleted on 2026-09-09 (not intentional); re-filed so the review can continue. Sorry for the noise. |
Issue for this PR
Fixes #47062
Type of change
What does this PR do?
The event-stream client retried on a fixed one-second delay regardless of why the stream died, so an unauthenticated browser session re-triggered the Basic auth prompt every second while the shell sat there unauthenticated. Streams that never connected successfully now scale the retry delay with the attempt count up to 30 seconds, which gives the browser prompt time to be answered; streams that connected and later dropped reset the attempt counter and keep the existing one-second retry.
The failure reason is intentionally not inspected — a declared 401 with an empty body surfaces client-side as an indistinguishable
ClientError("UnsupportedContentType"), and the never-connected case is the one that needs the guard regardless of cause.How did you verify your code works?
test/solid-connection.test.ts: a 401-empty-response API under a real clock — reconnect attempts stay monotonically increasing across 400ms and the inter-attempt gaps grow (no backoff would produce ~20 attempts, backoff produces ~7)reconnectBackoffDelayunit cases for scaling, the 30s cap, and the attempt-0 floorbun typecheck+ fullpackages/clientsuite (152 passing)Checklist