test(release): wait for live probe cleanup · openclaw/openclaw@0e7773d
steipete
·
2026-05-31
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2019,7 +2019,16 @@ async function requestGatewayAgentText(params: {
|
2019 | 2019 | ); |
2020 | 2020 | const first = await Promise.race([transcriptPromise, agentWaitPromise]); |
2021 | 2021 | if (first.kind === "transcript") { |
2022 | | -void agentWaitPromise.catch(() => undefined); |
| 2022 | +// Do not start the next live probe while this run is still cleaning up. |
| 2023 | +// The transcript can be visible before the embedded attempt reacquires and |
| 2024 | +// releases its session lock, and back-to-back probes on the same session |
| 2025 | +// can otherwise trip the takeover fence. |
| 2026 | +const waitResult = await agentWaitPromise; |
| 2027 | +if (waitResult.kind === "agent-error") { |
| 2028 | +throw waitResult.error instanceof Error |
| 2029 | + ? waitResult.error |
| 2030 | + : new Error(String(waitResult.error)); |
| 2031 | +} |
2023 | 2032 | return first.text; |
2024 | 2033 | } |
2025 | 2034 | void transcriptPromise.catch(() => undefined); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。