Skip to content

Commit 520a684

Browse files
authored
fetch: make readable-stream methods sync (#4346)
1 parent 6af603e commit 520a684

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/web/fetch/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,15 +1909,11 @@ async function httpNetworkFetch (
19091909
// cancelAlgorithm set to cancelAlgorithm.
19101910
const stream = new ReadableStream(
19111911
{
1912-
async start (controller) {
1912+
start (controller) {
19131913
fetchParams.controller.controller = controller
19141914
},
1915-
async pull (controller) {
1916-
await pullAlgorithm(controller)
1917-
},
1918-
async cancel (reason) {
1919-
await cancelAlgorithm(reason)
1920-
},
1915+
pull: pullAlgorithm,
1916+
cancel: cancelAlgorithm,
19211917
type: 'bytes'
19221918
}
19231919
)

0 commit comments

Comments
 (0)