Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
http: add note about timer unref
PR-URL: #34143
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
ronag authored and MylesBorins committed Jul 16, 2020
1 parent ec9b49a commit 96ebd5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/_http_server.js
Expand Up @@ -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);
Expand Down

0 comments on commit 96ebd5f

Please sign in to comment.