fix(media): cancel ignored input fetch bodies · openclaw/openclaw@9803261
vincentkoc
·
2026-05-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -223,7 +223,11 @@ export async function fetchWithGuard(params: {
|
223 | 223 | } |
224 | 224 | |
225 | 225 | async function discardIgnoredResponseBody(response: Response): Promise<void> { |
226 | | -await response.body?.cancel().catch(() => undefined); |
| 226 | +const cancelBody = response.body?.cancel; |
| 227 | +if (typeof cancelBody !== "function") { |
| 228 | +return; |
| 229 | +} |
| 230 | +await cancelBody.call(response.body).catch(() => undefined); |
227 | 231 | } |
228 | 232 | |
229 | 233 | function decodeTextContent(buffer: Buffer, charset: string | undefined): string { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。