mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-12 20:25:06 +01:00
stream/shared: use res.end() instead of destroy for closing response
This commit is contained in:
parent
89d9d555d1
commit
aba1d80615
1 changed files with 5 additions and 2 deletions
|
@ -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 a new issue