stream/shared: use res.end() instead of destroy for closing response

This commit is contained in:
dumbmoron 2024-05-22 15:09:14 +00:00
parent 91345a0b19
commit 5db4d4c737
No known key found for this signature in database

View File

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