fix: recover channel after stop timeout in health monitor · openclaw/openclaw@8b4be2f
sheyanmin
·
2026-06-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -456,8 +456,25 @@ export function createChannelManager(opts: ChannelManagerOptions): ChannelManage
|
456 | 456 | if (manuallyStopped.has(rKey)) { |
457 | 457 | return; |
458 | 458 | } |
459 | | -recoveryStartRequested.add(rKey); |
460 | | -setRuntime(channelId, id, { accountId: id, restartPending: true }); |
| 459 | +// When a previous stop timed out and the health monitor is |
| 460 | +// requesting recovery again, clean up the stuck task so the |
| 461 | +// channel can actually restart instead of staying in limbo. |
| 462 | +if (recoveryStartRequested.has(rKey)) { |
| 463 | +recoveryStopTimedOut.delete(rKey); |
| 464 | +recoveryStartRequested.delete(rKey); |
| 465 | +restartAttempts.delete(rKey); |
| 466 | +store.aborts.delete(id); |
| 467 | +store.tasks.delete(id); |
| 468 | +setRuntime(channelId, id, { |
| 469 | +accountId: id, |
| 470 | +restartPending: false, |
| 471 | +reconnectAttempts: 0, |
| 472 | +}); |
| 473 | +} else { |
| 474 | +recoveryStartRequested.add(rKey); |
| 475 | +setRuntime(channelId, id, { accountId: id, restartPending: true }); |
| 476 | +return; |
| 477 | +} |
461 | 478 | } |
462 | 479 | return; |
463 | 480 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。