diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js index 46c2ba4e9ca35d..385225cabc402e 100644 --- a/lib/internal/process/stdio.js +++ b/lib/internal/process/stdio.js @@ -3,13 +3,7 @@ exports.getMainThreadStdio = getMainThreadStdio; function dummyDestroy(err, cb) { - // SyncWriteStream does not use the stream - // destroy mechanism for some legacy reason. - // TODO(mcollina): remove when - // https://github.com/nodejs/node/pull/26690 lands. - if (typeof cb === 'function') { - cb(err); - } + cb(err); // We need to emit 'close' anyway so that the closing // of the stream is observable. We just make sure we