Skip to content

Commit

Permalink
stream: avoid writing to writable
Browse files Browse the repository at this point in the history
A remainder from a previous refactoring.

Refs: nodejs#31197
  • Loading branch information
ronag committed Feb 15, 2020
1 parent df1592d commit 8dd4e55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,6 @@ function endWritable(stream, state, cb) {
onFinished(stream, state, cb);
}
state.ended = true;
stream.writable = false;
}

function onCorkedFinish(corkReq, state, err) {
Expand Down Expand Up @@ -741,7 +740,7 @@ ObjectDefineProperties(Writable.prototype, {
get() {
const w = this._writableState;
if (!w) return false;
if (w.writable !== undefined) return w.writable;
if (w.writable !== undefined) return w.writable && !w.ended;
return Boolean(!w.destroyed && !w.errored && !w.ending);
},
set(val) {
Expand Down

0 comments on commit 8dd4e55

Please sign in to comment.