I believe blog get stream algorithm is missing a call to close that stream, which results in consumers of that readable stream never 'finishing' reading that stream.
For example, without a call to "close", from my reading 'done' will never get set to true for the following test:
letbuffer=newArrayBuffer(200);letbytesReceived=0;letoffset=0;letblob=newBlob(['Data to be read! 🦬']);conststream=blob.stream();constreader=stream.getReader({mode: "byob"});while(true){letresult=awaitreader.read(newtype(buffer,offset,buffer.byteLength-offset));if(result.done){return;}buffer=result.value.buffer;offset+=result.value.byteLength;bytesReceived+=result.value.byteLength;}I think the fix should be just adding a close into the blob-get-stream algorithm after all bytes have been queued into the stream.
I believe blog get stream algorithm is missing a call to close that stream, which results in consumers of that readable stream never 'finishing' reading that stream.
For example, without a call to "close", from my reading 'done' will never get set to true for the following test:
I think the fix should be just adding a close into the blob-get-stream algorithm after all bytes have been queued into the stream.