mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-12 11:52:12 +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) {
|
||||
if (!res.headersSent) res.sendStatus(500);
|
||||
return res.destroy();
|
||||
if (!res.headersSent) {
|
||||
res.sendStatus(500);
|
||||
}
|
||||
|
||||
return res.end();
|
||||
}
|
||||
|
||||
export function getHeaders(service) {
|
||||
|
|
Loading…
Reference in a new issue