Skip to content

Commit

Permalink
http: add note about timer unref
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Jun 30, 2020
1 parent 0edeeec commit 354000c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/_http_server.js
Expand Up @@ -588,6 +588,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 354000c

Please sign in to comment.