Repository navigation
feat!: Report every connection failure and add an option to not reconnect - #348
Draft
jsonbailey wants to merge 1 commit into
Draft
jsonbailey wants to merge 1 commit into
jsonbailey wants to merge 1 commit into
Conversation
jsonbailey
added this pull request to stack #353
October 16, 2026 06:33
jsonbailey
commented
Oct 16, 2026
| EventSourceLogger? logger, | ||
| Uri Function()? uriProvider}) { | ||
| Uri Function()? uriProvider, | ||
| bool autoReconnect = true}) { |
Author
There was a problem hiding this comment.
Cross-SDK note: iOS stops its SSE library by returning .shutdown from connectionErrorHandler, and Android returns ConnectionErrorHandler.Action.SHUTDOWN. The Dart client had no way to control its retry, and a 0 s retry would race with the owner's close, so this adds an explicit option.
jsonbailey
commented
Oct 16, 2026
| StateIdle.run(svo, errorCause: error); | ||
| return; | ||
| } | ||
| svo.reportError(error); |
Author
There was a problem hiding this comment.
In default mode the client now also reports routine failures (server close, timeout, transport, content type). FDv2 streaming maps them to interrupted, which matches Android FDv2 (FDv2StreamingSynchronizer.handleError). Intermediate PRs in this stack fail the v2 streaming contract tests, because main's FDv1 streaming code meets this library. #352 replaces that code.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #348. Adds the retry groundwork to
launchdarkly_dart_common, so that data sources now (and the event processor later) share one implementation.RetryState: exponential backoff with jitter, a normal regime and a sticky extended regime for unexpected failures, a reset after healthy operation (a duration for streaming, 2 successes for polling), and a floor at the poll interval.FailureKind, plusclassifyHttpStatusandcredentialHintinnetwork/utils.dart, next toisHttpGloballyRecoverable.common_clientand the Flutter SDK do not re-export them.