docs: document gateway channel helpers · openclaw/openclaw@8e371cf
steipete
·
2026-06-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Gateway channel manager. |
| 2 | +// Starts, stops, restarts, and snapshots plugin channel account runtimes. |
1 | 3 | import { resolveChannelDefaultAccountId } from "../channels/plugins/helpers.js"; |
2 | 4 | import { type ChannelId, getChannelPlugin, listChannelPlugins } from "../channels/plugins/index.js"; |
3 | 5 | import type { ChannelAccountSnapshot } from "../channels/plugins/types.public.js"; |
@@ -94,6 +96,8 @@ async function waitForChannelStopGracefully(task: Promise<unknown> | undefined,
|
94 | 96 | if (!task) { |
95 | 97 | return true; |
96 | 98 | } |
| 99 | +// Channel stop hooks can hang during provider disconnects. Bound the wait so |
| 100 | +// restart/reload can continue after aborting the runtime. |
97 | 101 | return await new Promise<boolean>((resolve) => { |
98 | 102 | let settled = false; |
99 | 103 | const timer = setTimeout(() => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。