-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Calvin Metcalf <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Calvin Metcalf <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Calvin Metcalf <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Calvin Metcalf <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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