Skip to content

best way to save what you love

stream: dont double send headers on critical error

wukkob0da5bb89317
diff --git a/src/modules/stream/stream.js b/src/modules/stream/stream.js
index 3b3494b6..08edb079 100644
--- a/src/modules/stream/stream.js
+++ b/src/modules/stream/stream.js
@@ -1,5 +1,6 @@
import { streamAudioOnly, streamDefault, streamLiveRender, streamVideoOnly, convertToGif } from "./types.js";
import { internalStream } from './internal.js';
+import { closeResponse } from "./shared.js";
export default async function(res, streamInfo) {
try {
@@ -25,6 +26,6 @@ export default async function(res, streamInfo) {
break;
}
} catch {
- res.sendStatus(500);
+ closeResponse(res)
}
}