From d263c632e3d5a91fd6f9fffc598128d87c5621cd Mon Sep 17 00:00:00 2001 From: ud2 Date: Mon, 25 Mar 2024 01:49:01 +0800 Subject: fix(ext/fetch): make `EventSource` more robust (#22493) This PR fixes all unhandled rejections and resource leaks found while adding a test for #22368. --- ext/fetch/26_fetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/fetch/26_fetch.js') diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index c4669e430..458155a28 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -169,7 +169,7 @@ async function mainFetch(req, recursive, terminator) { try { resp = await opFetchSend(requestRid); } catch (err) { - if (terminator.aborted) return; + if (terminator.aborted) return abortedNetworkError(); throw err; } finally { if (cancelHandleRid !== null) { -- cgit v1.2.3