This commit is contained in:
subnub
2020-05-11 12:26:29 -04:00
parent 50ae417c80
commit b0a2b171fe
2 changed files with 14 additions and 6 deletions
@@ -213,6 +213,14 @@ class S3Service implements ChunkInterface {
// console.log("req pause")
// })
req.on("close", () => {
console.log("req closed");
})
req.on("end", () => {
console.log("req end");
})
await awaitStreamVideo(start, end, differenceStart, decipher, res, tempUUID, allStreamsToErrorCatch);
}
@@ -21,14 +21,14 @@ const awaitStreamVideo = (start: number, end:number, differenceStart: number,
//console.log(tempStorage[tempUUID] !== currentUUID, tempStorage[tempUUID])
if (tempStorage[tempUUID] !== currentUUID) {
console.log("New Stream Requested, Desroying old stream");
// console.log("New Stream Requested, Desroying old stream");
streamsToErrorCatch.forEach((stream) => {
stream.destroy();
})
// streamsToErrorCatch.forEach((stream) => {
// stream.destroy();
// })
console.log("Old Stream Desroyed");
resolve();
// console.log("Old Stream Desroyed");
// resolve();
//delete tempStorage[tempUUID];
}