fix: always release response body, should fix issue #166

This commit is contained in:
lyc8503 committed 2025-12-24 00:03:18 +08:00
1 parent baf489e3cb
commit 51bf3be378
3 files changed
+9 -3

No files matched your search

+2
View File
@@ -304,6 +304,8 @@ export async function getStatus(
response.status,
response.text.bind(response)
)
try { await response.body?.cancel() } catch(e) {} // Always try to cancel body, see issue #166
if (err !== null) {
console.log(`${monitor.name} didn't pass response check: ${err}`)
}