stream: dont double send headers on critical error

This commit is contained in:
wukko 2024-05-22 01:21:34 +06:00
parent f632c7dfb3
commit b0da5bb893
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -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)
}
}