Skip to content

Commit

Permalink
update: fixed issue stream closed prematurely
Browse files Browse the repository at this point in the history
fastify/fastify-compress#215
adding return to response.send
  • Loading branch information
defrindr committed Oct 2, 2022
1 parent d5d7de0 commit e9b20d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Handler/Response.ts
Expand Up @@ -117,7 +117,7 @@
// Venida.Request.resetRequestTime();

response.status(responseContent.responseCode);
response.send(responseContent);
return response.send(responseContent);
}

public sendError (response: {[key: string]: any}, errorCode: string, options: any = null) {
Expand All @@ -129,7 +129,7 @@
responseContent['execTime'] = Math.floor(Date.now()/1000) - Venida.Request.requestTime;

response.status(responseContent.responseCode);
response.send(responseContent);
return response.send(responseContent);
}

public exception (errorCode: string, error: any, options: any = null) {
Expand Down

0 comments on commit e9b20d7

Please sign in to comment.