mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user