Skip to content

Commit

Permalink
child_process: reuse existing no-op function
Browse files Browse the repository at this point in the history
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 authored and evanlucas committed Aug 24, 2016
1 parent 498238f commit 71343b6
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 71343b6

Please sign in to comment.