Browse Source

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: https://github.com/nodejs/node/pull/8164
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
v6.x
cjihrig 8 years ago
committed by Evan Lucas
parent
commit
71343b6caa
  1. 2
      lib/internal/child_process.js

2
lib/internal/child_process.js

@ -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;
}

Loading…
Cancel
Save