fix(useGameState): re-arm SSE silence check on every message — a stream that goes silent after the first event must fall back to polling again (run-178 root cause); unit: pin NZAA→NFTF full-pipeline marker lons on stored dataset coords
CI / build + unit + e2e (pull_request) Failing after 19m22s

This commit is contained in:
2026-09-23 01:59:54 +00:00
parent 7671c028b4
commit d0aec35db1
3 changed files with 43 additions and 1 deletions
+2 -1
View File
@@ -106,7 +106,8 @@ export function useGameState(intervalMs = 1000): GameStateResult {
// malformed event — the next one overwrites it anyway
}
stopPolling(); // fresh push flow → polling no longer needed
if (silenceTimer !== null) clearTimeout(silenceTimer); // connect check served its purpose
if (silenceTimer !== null) clearTimeout(silenceTimer);
silenceTimer = setTimeout(startPolling, SSE_SILENCE_MS); // re-arm on EVERY message: a stream that goes silent after the first event (half-open connection — no onerror fires) must fall back to polling again, or state freezes until reload
};
source.onerror = () => startPolling(); // stream trouble → poll until pushes resume
silenceTimer = setTimeout(startPolling, SSE_SILENCE_MS); // connected but silent for 5 s → poll