mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 03:20:22 +00:00
fix(browser): land PR #24142 flush relay pending timers on stop
Flush pending extension request timers/rejections during relay shutdown and document in changelog. Landed from contributor @kevinWangSheng (PR #24142). Co-authored-by: Shawn <118158941+kevinWangSheng@users.noreply.github.com>
This commit is contained in:
@@ -820,6 +820,11 @@ export async function ensureChromeExtensionRelayServer(opts: {
|
||||
extensionConnected,
|
||||
stop: async () => {
|
||||
relayRuntimeByPort.delete(port);
|
||||
for (const [, pending] of pendingExtension) {
|
||||
clearTimeout(pending.timer);
|
||||
pending.reject(new Error("server stopping"));
|
||||
}
|
||||
pendingExtension.clear();
|
||||
try {
|
||||
extensionWs?.close(1001, "server stopping");
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user