Repository navigation
fix(ui): reconnect event streams that stop delivering data - #5995
Merged
Merged
Conversation
SteKoe
force-pushed
the
fix/sse-heartbeat-watchdog
branch
from
November 28, 2026 13:24
4a242aa to
30e4c0b
Compare
SteKoe
enabled auto-merge (squash)
November 28, 2026 13:24
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.
The server sends a
:pingcomment every 10 seconds on/applicationsand/instances/events. The browser's nativeEventSourcenever exposes comments, and the UI only reconnects after anerror. If a NAT, firewall or route drops an idle connection without closing it, the UI gets neither data nor an error, and keeps showing the last state it saw until the page is reloaded.Use
event-source-polyfill(already a dependency, so far only loaded whenEventSourceis missing) for all event streams, with aheartbeatTimeoutof 30 seconds. It counts comments as activity, aborts the request and reports an error when nothing arrives within the timeout, and the existing reconnect inApplicationStoretakes over (5 second delay). The timeout tolerates two missed pings.The journal did not reconnect at all, it only showed an error. It now reconnects as well, and reloads the events first, so events from the outage are not lost.
utils/eventsource-polyfill.tsis replaced byutils/eventsource.ts.How I tested this
Reproduced with a three node Hazelcast cluster behind Eureka, a browser that stays open, and a small TCP forwarder that silently stalls SSE connections (no close, no error):
New specs fail without the change:
utils/eventsource.spec.ts,services/eventstream.spec.ts, and two cases inviews/journal/index.spec.ts. The whole UI suite passes (632 tests), as do lint and prettier.Also checked with a plain server: the polyfill sends cookies like the native
EventSource, and handles a Basic auth challenge.What this does not show
EventSource. The polyfill logs aconsole.errorwhen it times out.