diff --git a/src/modules/stream/shared.js b/src/modules/stream/shared.js index 8b4c9109..4dbd59d3 100644 --- a/src/modules/stream/shared.js +++ b/src/modules/stream/shared.js @@ -17,8 +17,11 @@ const serviceHeaders = { } export function closeResponse(res) { - if (!res.headersSent) res.sendStatus(500); - return res.destroy(); + if (!res.headersSent) { + res.sendStatus(500); + } + + return res.end(); } export function getHeaders(service) {