diff --git a/lib/plugins/bodyReader.js b/lib/plugins/bodyReader.js index 3736aadec..a1b2c5552 100644 --- a/lib/plugins/bodyReader.js +++ b/lib/plugins/bodyReader.js @@ -178,7 +178,7 @@ function bodyReader(options) { // add 'close and 'aborted' event handlers so that requests (and their // corresponding memory) don't leak if client stops sending data half // way through a POST request - req.once('close', next); + req.socket.once('close', next); req.once('aborted', next); req.resume(); }