From cefa4cf35c26bb502e01735a69006166a269ed79 Mon Sep 17 00:00:00 2001 From: cmliu Date: Wed, 5 Aug 2026 02:29:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E8=BF=9E?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=9C=A8=E9=87=8D?= =?UTF-8?q?=E8=BF=9E=E5=A4=B1=E8=B4=A5=E6=97=B6=E4=BF=9D=E7=95=99=E5=B0=9D?= =?UTF-8?q?=E8=AF=95=E6=AC=A1=E6=95=B0=E4=BB=A5=E7=BB=A7=E7=BB=AD=E9=87=8D?= =?UTF-8?q?=E8=AF=95=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/process-manager.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/process-manager.ts b/frontend/src/process-manager.ts index 4ae940f..655b64d 100644 --- a/frontend/src/process-manager.ts +++ b/frontend/src/process-manager.ts @@ -872,7 +872,13 @@ export class ProcessManager { console.log( `[WS-Reconnect] ${new Date().toISOString()} | Process | reconnect_failed | attempt=${attempts}/${RECONNECT_MAX_ATTEMPTS}`, ); + // attach() zeroed the counter; restore so the retry chain continues + // where it left off instead of restarting from attempt 1. + if (this.wantConnection) { + this.reconnectAttempts = attempts; + } this.scheduleReconnect(); + return; } // Successful attach() zeros reconnectAttempts; restore so the open // handler can log reconnect_success and the back-off chain continues