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 immediate ??= setImmediate ( ( ) => {
587589 immediate = undefined ;
588590 wakeup . resolve ?. ( ) ;
@@ -632,7 +634,7 @@ async function* createBlobReaderIterable(reader, options = kEmptyObject) {
632634 if ( error ) throw error ;
633635
634636 if ( blocked ) {
635- const fin = await wakeup . promise ;
637+ await wakeup . promise ;
636638 wakeup = PromiseWithResolvers ( ) ;
637639 // If the wakeup was triggered by FIN (EndReadable), the DataQueue
638640 // is capped. Continue the loop to pull again -- the next pull will
You can’t perform that action at this time.
0 commit comments