stream: clean endWritableNT

The `state` argument was unused.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Mestery authored and Node.js GitHub Bot committed 2021-08-05 16:01:55 +00:00
1 parent 0220497f90
commit 712059a232
1 file changed
+2 -2
+2 -2
View File
@@ -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) {