diff --git a/lib/_http_server.js b/lib/_http_server.js index 842bfb5eb7a0d5..bef14bc880165c 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -568,6 +568,10 @@ function socketOnData(server, socket, parser, state, d) { } function onParserExecute(server, socket, parser, state, ret) { + // When underlying `net.Socket` instance is consumed - no + // `data` events are emitted, and thus `socket.setTimeout` fires the + // callback even if the data is constantly flowing into the socket. + // See, https://github.com/nodejs/node/commit/ec2822adaad76b126b5cccdeaa1addf2376c9aa6 socket._unrefTimer(); debug('SERVER socketOnParserExecute %d', ret); onParserExecuteCommon(server, socket, parser, state, ret, undefined);