fix(bridge): resolve websocket zombie connection and bounding memory leaks

This commit is contained in:
Variet Worker
2026-03-23 21:11:52 +09:00
parent e21f71baf8
commit ecebec3906
10 changed files with 110 additions and 25 deletions

View File

@@ -92,6 +92,7 @@ export function resetPendingState(): void {
* re-detection of WAITING steps whose pending was lost during disconnect.
*/
export function resetPendingStateForReconnect(): void {
if (!ctx) return; // Prevent startup race conditions
ctx.lastPendingStepIndex = -1;
ctx.stallProbed = false;
ctx.sawRunningAfterPending = false;