Skip to content

Commit d4eda4d

Browse files
committed
process: remove protection for SyncWriteStream destroy in stdio
#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: #26691 PR-URL: #26902 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 4bfc06f commit d4eda4d

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)