Skip to content

Commit

Permalink
stream: clean endWritableNT
Browse files Browse the repository at this point in the history
The `state` argument was unused.

PR-URL: #39645
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
  • Loading branch information
Mesteery authored and targos committed Sep 4, 2021
1 parent cf59e87 commit de17117
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/streams/readable.js
Expand Up @@ -1334,7 +1334,7 @@ function endReadableNT(state, stream) {
stream.emit('end');

if (stream.writable && stream.allowHalfOpen === false) {
process.nextTick(endWritableNT, state, stream);
process.nextTick(endWritableNT, stream);
} else if (state.autoDestroy) {
// In case of duplex streams we need a way to detect
// if the writable side is ready for autoDestroy as well.
Expand All @@ -1353,7 +1353,7 @@ function endReadableNT(state, stream) {
}
}

function endWritableNT(state, stream) {
function endWritableNT(stream) {
const writable = stream.writable && !stream.writableEnded &&
!stream.destroyed;
if (writable) {
Expand Down

0 comments on commit de17117

Please sign in to comment.