Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4e07faa

Browse filesBrowse files
ronagaddaleax
authored andcommitted
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>
1 parent 4ae34e8 commit 4e07faa
Copy full SHA for 4e07faa

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎lib/_http_server.js‎

Copy file name to clipboardExpand all lines: lib/_http_server.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,10 @@ function socketOnData(server, socket, parser, state, d) {
566566
}
567567

568568
function onParserExecute(server, socket, parser, state, ret) {
569+
// When underlying `net.Socket` instance is consumed - no
570+
// `data` events are emitted, and thus `socket.setTimeout` fires the
571+
// callback even if the data is constantly flowing into the socket.
572+
// See, https://github.com/nodejs/node/commit/ec2822adaad76b126b5cccdeaa1addf2376c9aa6
569573
socket._unrefTimer();
570574
debug('SERVER socketOnParserExecute %d', ret);
571575
onParserExecuteCommon(server, socket, parser, state, ret, undefined);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.