starting work on glb(s) management 2

This commit is contained in:
Yeicor
2024-02-16 21:49:01 +01:00
parent ee160c1ee4
commit 7f7ff86f9f

View File

@@ -51,7 +51,6 @@ async function singleBlob(reader: ReadableStream<Uint8Array>, stopAfter: number
// Make sure the reader reads the entire stream at once. // Make sure the reader reads the entire stream at once.
const readerImpl = reader.getReader(); const readerImpl = reader.getReader();
let bufferedChunks: Uint8Array = new Uint8Array(); let bufferedChunks: Uint8Array = new Uint8Array();
try {
let done = false; let done = false;
let length = 0; let length = 0;
while (!done) { while (!done) {
@@ -71,9 +70,6 @@ async function singleBlob(reader: ReadableStream<Uint8Array>, stopAfter: number
} }
done = d; done = d;
} }
} finally {
await readerImpl.cancel();
}
return new ReadableStream<Uint8Array>({ return new ReadableStream<Uint8Array>({
start(controller) { start(controller) {
controller.enqueue(bufferedChunks); controller.enqueue(bufferedChunks);