http: add note about timer unref

PR-URL: https://github.com/nodejs/node/pull/34143
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Robert Nagy committed 2020-07-09 09:14:12 +02:00
1 parent 527e2147af
commit e8f57456be
1 file changed
+4
+4
View File
@@ -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);