fix(app): reconnect stale event streams - #41002
Open
zcxGGmu wants to merge 1 commit into
Open
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate Found:fix(app): recover from a silently dead event stream (PR #39349) This PR appears to address the same or very similar issue. Both PRs focus on handling stale/dead event streams on the client side. Since PR #41002 is closing issue #40910 and PR #39349 deals with recovering from silently dead event streams, you should verify:
|
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.
Issue for this PR
Closes #40910
Type of change
What does this PR do?
Adds a client-side watchdog for the global web event stream. After a stream connects, the watchdog is reset whenever an SSE event arrives. If no event or heartbeat arrives for 45 seconds, it aborts the current stream attempt so the existing reconnect loop can establish a fresh subscription.
This helps the web UI recover when a reverse proxy silently drops or stalls the
/global/eventSSE stream while the session continues running server-side.How did you verify your code works?
cd packages/app && bun test --conditions=solid --preload ./happydom.ts src/context/server-sdk.test.ts --timeout 30000bunx oxlint packages/app/src/context/server-sdk.tsx packages/app/src/context/server-sdk.test.tsgit diff --checkcd packages/app && bun run typecheckis currently blocked by the existing, unmodifiedsrc/custom-elements.d.tsfile (../../ui/src/custom-elements.d.ts), which matchesupstream/devand fails before this change is typechecked.Screenshots / recordings
N/A; this is an event-stream recovery fix.
Checklist