Skip to content

Commit

Permalink
fix(bodyReader): Fix memory leak
Browse files Browse the repository at this point in the history
Without handling the req 'close' event, we will leak ClientRequest objects when the client suddently stops sending the request body.
  • Loading branch information
daviande committed Nov 15, 2017
1 parent 4722a57 commit aec11c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/plugins/bodyReader.js
Expand Up @@ -172,6 +172,7 @@ function bodyReader(options) {
});

req.once('error', next);
req.once('close', next);
req.resume();
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -73,7 +73,7 @@
"express",
"DTrace"
],
"version": "6.3.2",
"version": "6.3.3",
"repository": {
"type": "git",
"url": "git://github.com/restify/node-restify.git"
Expand Down

0 comments on commit aec11c3

Please sign in to comment.