fix(satellites): forget ISS telemetry from dropped sockets

A new ISSLive connection must rebuild its own joint snapshot and station-clock
liveness. Without clearing the prior session, a fast reconnect can mark old
joint positions live before fresh angles arrive.

Add a node:test reconnect regression and update the runtime contract.
Follow-up to PR #1767 by ZloyS; original ISS model credit: IMBrandao (#1690).

Tests: node --test server/providers/space/issTelemetry.test.mjs (UNRUN)
This commit is contained in:
Kevin Rajan authored and Denis Groshev committed 2026-11-16 21:54:05 +01:00
1 parent f0d2906220
commit 79ab830824
4 files changed
+55 -1

No files matched your search

+5
View File
@@ -179,6 +179,11 @@ export function createIssTelemetryRelay({ createSocket, now = Date.now }) {
const old = socket;
socket = null;
fields.clear();
// A replacement session must rebuild both its joint snapshot and signal
// credit; a new clock tick cannot make the old session's angles live.
values.clear();
signalAt = null;
signalClass = null;
try {
old?.terminate?.();
} catch {