惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 司徒正美
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
罗磊的独立博客
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
J
Java Code Geeks
L
LangChain Blog
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(kitchen-sink): stop leaked RPC gateway groups · openc...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main

@@ -1021,26 +1021,30 @@ async function startGateway(runner, port, env, logPath) {

10211021

}

1022102210231023

export async function stopGateway(child, options = {}) {

1024-

if (!child || hasChildExited(child)) {

1024+

const killProcess = options.killProcess ?? defaultKillProcess;

1025+

if (!child || !isGatewayAlive(child, killProcess)) {

10251026

return;

10261027

}

10271028

const teardownGraceMs = Math.max(0, options.teardownGraceMs ?? GATEWAY_TEARDOWN_GRACE_MS);

10281029

const killGraceMs = Math.max(0, options.killGraceMs ?? GATEWAY_TEARDOWN_KILL_GRACE_MS);

10291030

const exited = new Promise((resolve) => {

10301031

child.once("exit", resolve);

10311032

});

1032-

const waitForExit = async (ms) =>

1033-

hasChildExited(child)

1034-

? true

1035-

: await Promise.race([exited.then(() => true), delay(ms).then(() => false)]);

1033+

const waitForExit = async (ms) => {

1034+

if (!isGatewayAlive(child, killProcess)) {

1035+

return true;

1036+

}

1037+

await Promise.race([exited, delay(ms)]);

1038+

return !isGatewayAlive(child, killProcess);

1039+

};

103610401037-

if (!signalGateway(child, "SIGTERM")) {

1041+

if (!signalGateway(child, "SIGTERM", killProcess)) {

10381042

return;

10391043

}

10401044

if (await waitForExit(teardownGraceMs)) {

10411045

return;

10421046

}

1043-

if (!signalGateway(child, "SIGKILL")) {

1047+

if (!signalGateway(child, "SIGKILL", killProcess)) {

10441048

return;

10451049

}

10461050

if (await waitForExit(killGraceMs)) {

@@ -1053,6 +1057,25 @@ export function hasChildExited(child) {

10531057

return child.exitCode !== null || child.signalCode !== null;

10541058

}

105510591060+

function defaultKillProcess(pid, signal) {

1061+

return process.kill(pid, signal);

1062+

}

1063+1064+

function isGatewayAlive(child, killProcess) {

1065+

if (process.platform !== "win32" && typeof child.pid === "number") {

1066+

try {

1067+

killProcess(-child.pid, 0);

1068+

return true;

1069+

} catch (error) {

1070+

if (error?.code === "ESRCH") {

1071+

return false;

1072+

}

1073+

throw error;

1074+

}

1075+

}

1076+

return !hasChildExited(child);

1077+

}

1078+10561079

function createChildExitPromise(child) {

10571080

if (!child || typeof child.once !== "function") {

10581081

return null;

@@ -1069,10 +1092,10 @@ function releaseUnsettledGatewayChild(child) {

10691092

child.unref?.();

10701093

}

107110941072-

function signalGateway(child, signal) {

1095+

function signalGateway(child, signal, killProcess = defaultKillProcess) {

10731096

if (process.platform !== "win32" && typeof child.pid === "number") {

10741097

try {

1075-

process.kill(-child.pid, signal);

1098+

killProcess(-child.pid, signal);

10761099

return true;

10771100

} catch (error) {

10781101

if (error?.code === "ESRCH") {