further fix

This commit is contained in:
split / May 2023-06-24 18:20:38 -07:00
parent 486fb6912e
commit 38dd9e9c57

View file

@ -350,9 +350,11 @@ export default class Files {
getNextChunk().then(async (nextChunk) => {
if (nextChunk == "__ERR") {this.destroy(new Error("file read error")); return}
let response = this.push(nextChunk)
while (response) {
response = this.push(await getNextChunk())
let nextChunk = await getNextChunk()
response = this.push(nextChunk)
if (!nextChunk) return
}
})
}