From 9e6c9b17b766eb7a85b83e8ae02377394c851c84 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 18 Jul 2025 00:41:28 +0200 Subject: [PATCH] fetch: make readable-stream methods sync --- lib/web/fetch/index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/web/fetch/index.js b/lib/web/fetch/index.js index 0c2f5b9693f..9ccf36bf76a 100644 --- a/lib/web/fetch/index.js +++ b/lib/web/fetch/index.js @@ -1909,15 +1909,11 @@ async function httpNetworkFetch ( // cancelAlgorithm set to cancelAlgorithm. const stream = new ReadableStream( { - async start (controller) { + start (controller) { fetchParams.controller.controller = controller }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, + pull: pullAlgorithm, + cancel: cancelAlgorithm, type: 'bytes' } )