-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
stream: emit finish when using writev and cork #13195
Conversation
cc @nodejs/streams |
cc @cynron |
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.
There's a typo in the commit message. Also it might be worthwhile to note in the test and commit message that it's only missing when an error occurs/is passed. |
@mscdex updated. |
It looks like there were linting errors during the last CI run. Here's CI again though: https://ci.nodejs.org/job/node-test-pull-request/8283/ |
👌 |
@mcollina Looks like there's still linter errors |
In Writable, 'finish' was not emitted when using writev() and cork() in the event of an Error during the write. This commit makes it consistent with the write() path, which emits 'finish'. Fixes: nodejs#11121
@mscdex weird, https://ci.nodejs.org/job/node-test-linter/9327/console is not showing up what the problem is. I've amended a line ending, something went wrongly on my box. Fresh CI: https://ci.nodejs.org/job/node-test-pull-request/8303/ |
Ref: nodejs/build#720 (I have it in my TODO list to fix |
Landed as b153420. |
In Writable, 'finish' was not emitted when using writev() and cork() in the event of an Error during the write. This commit makes it consistent with the write() path, which emits 'finish'. Fixes: #11121 PR-URL: #13195 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In Writable, 'finish' was not emitted when using writev() and cork() in the event of an Error during the write. This commit makes it consistent with the write() path, which emits 'finish'. Fixes: #11121 PR-URL: #13195 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
When _write completes with an Error, 'finish' was emitted before 'error' if the callback was asynchronous. This commit restore the previous behavior. The logic is still less then ideal, because we call the write() callback before emitting error if asynchronous, but after if synchronous. This commit do not try to change the behavior. This commit fixes a regression introduced by: nodejs#13195. Fixes: nodejs#13812
@nodejs/LTS We should not land this in v6.x yet |
@nodejs/lts ^ |
This should land with #13850 (assuming that lands), but as Myles says should probably wait another release or two. |
When _write completes with an Error, 'finish' was emitted before 'error' if the callback was asynchronous. This commit restore the previous behavior. The logic is still less then ideal, because we call the write() callback before emitting error if asynchronous, but after if synchronous. This commit do not try to change the behavior. This commit fixes a regression introduced by: #13195. Fixes: #13812 PR-URL: #13850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
When _write completes with an Error, 'finish' was emitted before 'error' if the callback was asynchronous. This commit restore the previous behavior. The logic is still less then ideal, because we call the write() callback before emitting error if asynchronous, but after if synchronous. This commit do not try to change the behavior. This commit fixes a regression introduced by: #13195. Fixes: #13812 PR-URL: #13850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In Writable, 'finish' was not emitted when using writev() and
cork() in the event of an Error. This commit makes it consistent with the write() path,
which emits 'finish'.
Fixes: #11121
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
stream