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:
parent
7b1b0c4ff0
commit
ccbb3c78cd
@ -87,7 +87,7 @@ const handleConversion = {
|
|||||||
// remove handle from socket object, it will be closed when the socket
|
// remove handle from socket object, it will be closed when the socket
|
||||||
// will be sent
|
// will be sent
|
||||||
if (!options.keepOpen) {
|
if (!options.keepOpen) {
|
||||||
handle.onread = function() {};
|
handle.onread = nop;
|
||||||
socket._handle = null;
|
socket._handle = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user