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 danielleadams committed Aug 16, 2021
1 parent 952a528 commit 975edf5
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 @@ -1348,7 +1348,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 @@ -1367,7 +1367,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 975edf5

Please sign in to comment.