summaryrefslogtreecommitdiff
path: root/ext/fetch/26_fetch.js
diff options
context:
space:
mode:
authorud2 <sjx233@qq.com>2024-03-25 01:49:01 +0800
committerGitHub <noreply@github.com>2024-03-24 18:49:01 +0100
commitd263c632e3d5a91fd6f9fffc598128d87c5621cd (patch)
treee66e1ba7bd8597ac7a1c337cd96117160bbabb94 /ext/fetch/26_fetch.js
parentae52b49dd6edcfbb88ea39c3fcf0c0cc4b59eee7 (diff)
fix(ext/fetch): make `EventSource` more robust (#22493)
This PR fixes all unhandled rejections and resource leaks found while adding a test for #22368.
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r--ext/fetch/26_fetch.js2
1 files changed, 1 insertions, 1 deletions
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) {