fix: skip stopped worker protocol subscriptions

This commit is contained in:
2026-09-14 23:31:14 +09:00
parent beeba1fdfc
commit 86dd67a24c
2 changed files with 2 additions and 1 deletions
@@ -380,6 +380,7 @@ Deno.test("Worker Console uses protocol observation events without transcript fe
consolePage.includes("connectProtocolTransport") && consolePage.includes("connectProtocolTransport") &&
consolePage.includes("handleIncomingProtocolEvent") && consolePage.includes("handleIncomingProtocolEvent") &&
consolePage.includes("workspaceMultiplexer") && consolePage.includes("workspaceMultiplexer") &&
consolePage.includes('targetWorker.state === "stopped"') &&
consolePage.includes('topic: "worker_protocol"') && consolePage.includes('topic: "worker_protocol"') &&
!consolePage.includes("seenObservationEventIds") && !consolePage.includes("seenObservationEventIds") &&
consolePage.includes("createConsoleProjector") && consolePage.includes("createConsoleProjector") &&
@@ -934,7 +934,7 @@
token: number, token: number,
target: ConsoleTarget, target: ConsoleTarget,
) { ) {
if (!targetWorker) { if (!targetWorker || targetWorker.state === "stopped") {
protocolState = "closed"; protocolState = "closed";
return; return;
} }