mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
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:
1 parent
f0d2906220
commit
79ab830824
4 files changed
+55
-1
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user