From e02333d9674924f372abf58eb9866b822ea062ca Mon Sep 17 00:00:00 2001 From: Mestery Date: Tue, 3 Aug 2021 13:25:19 +0200 Subject: [PATCH] stream: clean `endWritableNT` The `state` argument was unused. --- lib/internal/streams/readable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/streams/readable.js b/lib/internal/streams/readable.js index 75397b0cdefc0a..22c30f03bd62f4 100644 --- a/lib/internal/streams/readable.js +++ b/lib/internal/streams/readable.js @@ -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. @@ -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) {