File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -582,7 +582,9 @@ async function* createBlobReaderIterable(reader, options = kEmptyObject) {
582582 const { getReadError } = options ;
583583 let wakeup = PromiseWithResolvers ( ) ;
584584 let immediate ;
585- reader . setWakeup ( ( ) => {
585+ let fin = false ;
586+ reader . setWakeup ( ( setfin ) => {
587+ fin ||= setfin ;
586588 if ( typeof immediate === 'undefined' ) {
587589 // Postpone the execution to the next steps of the event loop
588590 immediate = setImmediate ( ( ) => {
@@ -635,7 +637,7 @@ async function* createBlobReaderIterable(reader, options = kEmptyObject) {
635637 if ( error ) throw error ;
636638
637639 if ( blocked ) {
638- const fin = await wakeup . promise ;
640+ await wakeup . promise ;
639641 wakeup = PromiseWithResolvers ( ) ;
640642 // If the wakeup was triggered by FIN (EndReadable), the DataQueue
641643 // is capped. Continue the loop to pull again -- the next pull will
You can’t perform that action at this time.
0 commit comments