mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-19 22:57:06 +02:00
stream: dont double send headers on critical error
This commit is contained in:
parent
f632c7dfb3
commit
b0da5bb893
@ -1,5 +1,6 @@
|
|||||||
import { streamAudioOnly, streamDefault, streamLiveRender, streamVideoOnly, convertToGif } from "./types.js";
|
import { streamAudioOnly, streamDefault, streamLiveRender, streamVideoOnly, convertToGif } from "./types.js";
|
||||||
import { internalStream } from './internal.js';
|
import { internalStream } from './internal.js';
|
||||||
|
import { closeResponse } from "./shared.js";
|
||||||
|
|
||||||
export default async function(res, streamInfo) {
|
export default async function(res, streamInfo) {
|
||||||
try {
|
try {
|
||||||
@ -25,6 +26,6 @@ export default async function(res, streamInfo) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
res.sendStatus(500);
|
closeResponse(res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user