mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 11:18:28 +00:00
stream/shared: use res.end() instead of destroy for closing response
This commit is contained in:
parent
91345a0b19
commit
5db4d4c737
@ -17,8 +17,11 @@ const serviceHeaders = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function closeResponse(res) {
|
export function closeResponse(res) {
|
||||||
if (!res.headersSent) res.sendStatus(500);
|
if (!res.headersSent) {
|
||||||
return res.destroy();
|
res.sendStatus(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
return res.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getHeaders(service) {
|
export function getHeaders(service) {
|
||||||
|
Loading…
Reference in New Issue
Block a user