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

推荐订阅源

WordPress大学
WordPress大学
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
G
Google Developers Blog
博客园_首页
有赞技术团队
有赞技术团队
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题

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(gateway): defer recovery restarts to callers · opencl...
obviyus · 2026-05-30 · via Recent Commits to openclaw:main

@@ -249,6 +249,7 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage

249249

// Tracks accounts that were manually stopped so we don't auto-restart them.

250250

const manuallyStopped = new Set<string>();

251251

const recoveryStopTimedOut = new Set<string>();

252+

const recoveryStartRequested = new Set<string>();

252253253254

const restartKey = (channelId: ChannelId, accountId: string) => `${channelId}:${accountId}`;

254255

const ensureChannelLog = (channelId: ChannelId): SubsystemLogger => {

@@ -382,6 +383,7 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage

382383

store.runtimes.delete(id);

383384

restartAttempts.delete(restartKey(channelId, id));

384385

manuallyStopped.delete(restartKey(channelId, id));

386+

recoveryStartRequested.delete(restartKey(channelId, id));

385387

}

386388

};

387389

@@ -414,7 +416,12 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage

414416

const startup = await runTasksWithConcurrency({

415417

limit: CHANNEL_STARTUP_CONCURRENCY,

416418

tasks: accountIds.map((id) => async () => {

419+

const rKey = restartKey(channelId, id);

417420

if (store.tasks.has(id)) {

421+

if (recoveryStopTimedOut.has(rKey)) {

422+

recoveryStartRequested.add(rKey);

423+

setRuntime(channelId, id, { accountId: id, restartPending: true });

424+

}

418425

return;

419426

}

420427

const existingStart = store.starting.get(id);

@@ -490,7 +497,6 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage

490497

return;

491498

}

492499493-

const rKey = restartKey(channelId, id);

494500

if (!preserveManualStop) {

495501

manuallyStopped.delete(rKey);

496502

}

@@ -595,10 +601,25 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage

595601

.then(async () => {

596602

if (manuallyStopped.has(rKey)) {

597603

recoveryStopTimedOut.delete(rKey);

604+

recoveryStartRequested.delete(rKey);

598605

return;

599606

}

600607

if (recoveryStopTimedOut.has(rKey)) {

601608

recoveryStopTimedOut.delete(rKey);

609+

if (!recoveryStartRequested.delete(rKey)) {

610+

setRuntime(channelId, id, {

611+

accountId: id,

612+

restartPending: false,

613+

reconnectAttempts: 0,

614+

});

615+

if (store.tasks.get(id) === trackedPromise) {

616+

store.tasks.delete(id);

617+

}

618+

if (store.aborts.get(id) === abort) {

619+

store.aborts.delete(id);

620+

}

621+

return;

622+

}

602623

restartAttempts.delete(rKey);

603624

log.info?.(`[${id}] restarting after timed-out channel stop completed`);

604625

setRuntime(channelId, id, {

@@ -774,6 +795,7 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage

774795

return;

775796

}

776797

recoveryStopTimedOut.delete(rKey);

798+

recoveryStartRequested.delete(rKey);

777799

store.aborts.delete(id);

778800

store.tasks.delete(id);

779801

setRuntime(channelId, id, {