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>
This commit is contained in:
cjihrig 2016-08-18 13:38:53 -04:00
parent 7b1b0c4ff0
commit ccbb3c78cd

View File

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