fix(e2e): cancel kitchen probe body reads on abort · openclaw/openclaw@5776b9b
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -918,10 +918,12 @@ export async function fetchJson(url, options = {}) {
|
918 | 918 | timeoutPromise, |
919 | 919 | ...(abortPromise ? [abortPromise] : []), |
920 | 920 | ]); |
| 921 | +const bodyAbortPromise = abortPromise |
| 922 | + ? Promise.race([timeoutPromise, abortPromise]) |
| 923 | + : timeoutPromise; |
921 | 924 | const text = await Promise.race([ |
922 | | -readBoundedResponseText(response, maxBodyBytes, timeoutPromise), |
923 | | -timeoutPromise, |
924 | | - ...(abortPromise ? [abortPromise] : []), |
| 925 | +readBoundedResponseText(response, maxBodyBytes, bodyAbortPromise), |
| 926 | +bodyAbortPromise, |
925 | 927 | ]); |
926 | 928 | let body = null; |
927 | 929 | try { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。