Skip to content

Commit 8105984

Browse files
committed
process: remove protection for SyncWriteStream destroy in stdio
nodejs#26691 introduced an if to protect against SyncWriteStream not using the default .destroy() mechanism. This change removes that as SyncWriteStream now use standard .destroy(). See: nodejs#26691
1 parent bdea725 commit 8105984

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/internal/process/stdio.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33
exports.getMainThreadStdio = getMainThreadStdio;
44

55
function dummyDestroy(err, cb) {
6-
// SyncWriteStream does not use the stream
7-
// destroy mechanism for some legacy reason.
8-
// TODO(mcollina): remove when
9-
// https://github.com/nodejs/node/pull/26690 lands.
10-
if (typeof cb === 'function') {
11-
cb(err);
12-
}
6+
cb(err);
137

148
// We need to emit 'close' anyway so that the closing
159
// of the stream is observable. We just make sure we

0 commit comments

Comments
 (0)