Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
child_process: reuse existing no-op function
The internal/child_process module has an existing no-op
function. This commit utilizes that function, instead of
creating extraneous closures.

PR-URL: #8164
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
  • Loading branch information
cjihrig committed Aug 20, 2016
commit ccbb3c78cdee076f8499b637691a4e666cc210ac
2 changes: 1 addition & 1 deletion lib/internal/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const handleConversion = {
// remove handle from socket object, it will be closed when the socket
// will be sent
if (!options.keepOpen) {
handle.onread = function() {};
handle.onread = nop;
socket._handle = null;
}

Expand Down