young man, KILL YOURSELF!!

This commit is contained in:
May 2023-06-28 23:03:08 -07:00
parent 6fd5177c7a
commit aaa1d64f1f

View file

@ -345,11 +345,15 @@ export default class Files {
} }
} }
let ord:number[] = []
let dataStream = new Readable({ let dataStream = new Readable({
read(){ read(){
console.log(`${uploadId}: Getting chunk ${position+1}/${attachments.length}`) console.log(`${uploadId}: Getting chunk ${position+1}/${attachments.length}`)
let gC = position+1
getNextChunk().then(async (nextChunk) => { getNextChunk().then(async (nextChunk) => {
console.log(`${uploadId}: Got chunk ${position}/${attachments.length}. It is ${nextChunk ? "not " : ""}null.`) ord.push(gC)
console.log(`${uploadId}: Got chunk ${gC}/${attachments.length}, next up ${position}. It is ${nextChunk ? "not " : ""}null. Current order : ${ord.map(e => e.toString()).join(" ")}`)
if (nextChunk == "__ERR") {this.destroy(new Error("file read error")); return} if (nextChunk == "__ERR") {this.destroy(new Error("file read error")); return}
let response = this.push(nextChunk) let response = this.push(nextChunk)