Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
stream: avoid setting writable state#31805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ronag commented Feb 15, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Feb 15, 2020
nodejs-github-bot commented Feb 15, 2020
nodejs-github-bot commented Feb 15, 2020
nodejs-github-bot commented Feb 15, 2020
ronag commented Feb 15, 2020
@Trott: Problems getting CI to pass: Any advice? |
e6a54b6 to 7b70470CompareA remainder from a previous refactoring. Refs: nodejs#31197
7b70470 to 8dd4e55Compare
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs unit tests
e9a79e3 to a712f4eComparea712f4e to db24c25Comparenodejs-github-bot commented Feb 16, 2020
mcollina commented Feb 16, 2020
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 |
ronag commented Feb 16, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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 |
mcollina commented Feb 16, 2020
can you add a test for that? |
ronag commented Feb 16, 2020
|
mcollina commented Feb 16, 2020
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
nodejs-github-bot commented Feb 17, 2020
A remainder from a previous refactoring. Refs: #31197 PR-URL: #31805 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
ronag commented Feb 17, 2020
Landed in 85c6fcd |
A remainder from a previous refactoring.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes