From 88476976b7a6e87c61d6ab0e03319d8fa4c57fa8 Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 27 May 2026 23:40:38 +0200 Subject: [PATCH] stream-worker: honest comment on heartbeat catch (argus nit on #529) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit argus pointed out the inline catch comment claimed dead ports get cleaned up on next subscribe, but nothing actually prunes the allPorts Set on subscribe — the honest answer is the one already at the bottom of onconnect: dead entries are left in the Set, the bound cost is acceptable, and postMessage's throw is the ambient signal we use. Point at that comment instead of repeating a wrong description. --- frontend/packages/dashboard/src/stream-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/dashboard/src/stream-worker.js b/frontend/packages/dashboard/src/stream-worker.js index 06e46c34..166cc7eb 100644 --- a/frontend/packages/dashboard/src/stream-worker.js +++ b/frontend/packages/dashboard/src/stream-worker.js @@ -59,7 +59,7 @@ const PING_INTERVAL_MS = 30_000; setInterval(() => { for (const port of allPorts) { try { port.postMessage({ kind: 'ping' }); } - catch { /* port dead — cleanup happens lazily on next subscribe */ } + catch { /* port dead — left in the Set; see onconnect's closing comment */ } } }, PING_INTERVAL_MS);