From aba1d8061572e2fc62814aedf1acd93aacfad39a Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Wed, 22 May 2024 15:09:14 +0000 Subject: [PATCH] stream/shared: use res.end() instead of destroy for closing response --- src/modules/stream/shared.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) {