From 7a3be8b981daab6ae4e6777419805d1fe45036dd Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Mon, 6 Nov 2023 01:48:49 +0000 Subject: [PATCH] stream: don't listen for `close` event for audio --- src/modules/stream/types.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/stream/types.js b/src/modules/stream/types.js index bf6d7594..c584789f 100644 --- a/src/modules/stream/types.js +++ b/src/modules/stream/types.js @@ -96,7 +96,9 @@ export async function streamLiveRender(streamInfo, res) { res.setHeader('Connection', 'keep-alive'); res.setHeader('Content-Disposition', contentDisposition(streamInfo.filename)); - pipe(audio, audioInput, shutdown); + audio.on('error', shutdown); + audioInput.on('error', shutdown); + audio.pipe(audioInput); pipe(muxOutput, res, shutdown); process.on('close', shutdown);