-
Notifications
You must be signed in to change notification settings - Fork 7
Gracefully drain SSE stream before shutdown #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
============================================
+ Coverage 76.77% 77.45% +0.68%
- Complexity 211 215 +4
============================================
Files 13 13
Lines 775 794 +19
Branches 68 72 +4
============================================
+ Hits 595 615 +20
+ Misses 146 143 -3
- Partials 34 36 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| protected void handleFaultEvent(FaultEvent faultEvent) { | ||
| if (assemblyFinished) { | ||
| shutdownEventSource(); | ||
| } | ||
| stopRequested = true; | ||
| shutdownEventSource(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new handleFaultEvent now unconditionally sets stopRequested and shuts down the EventSource whenever a FaultEvent arrives. Before this change, faults were ignored unless the assembly was already finished, allowing the LaunchDarkly client to reconnect transparently. With the new logic, any transient network hiccup before assembly_finished will stop the SSE loop permanently without notifying the listener, so the assembly listener may never receive either onAssemblyFinished or onError. This prematurely terminates monitoring of long‑running assemblies in unreliable network conditions.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
assembly_finishedarrives so that result events are not replayedTesting