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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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.