stream: avoid setting writable state#31805
Conversation
|
@Trott: Problems getting CI to pass: Any advice? |
e6a54b6 to
7b70470
Compare
A remainder from a previous refactoring. Refs: nodejs#31197
7b70470 to
8dd4e55
Compare
e9a79e3 to
a712f4e
Compare
a712f4e to
db24c25
Compare
|
I don't understand the reasoning behind this change, or what effect it would have on our APIs. Can you please elaborate? Note that the above link is a 404 |
It doesn't change the API at all. We did a refactoring in #31197 to make This PR doesn't change any API behavior. However, it fixes an unnecessary write to |
can you add a test for that? |
|
|
I’m lost. You said it would save a call to write() and I cannot see how. |
| onFinished(stream, state, cb); | ||
| } | ||
| state.ended = true; | ||
| stream.writable = false; |
There was a problem hiding this comment.
@mcollina: The point is to remove this. It’s unnecessary (it should already be false through the computed getter) and causes the ‘writable’ property to be unnecessarily added on the state object.
|
Landed in 85c6fcd |
A remainder from a previous refactoring.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes