Uh oh!
There was an error while loading. Please reload this page.
stream: emit finish when using writev and cork - #13195
Conversation
mcollina
commented
May 24, 2017
cc @nodejs/streams |
mcollina
commented
May 24, 2017
cc @cynron |
mscdex
commented
May 24, 2017
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. |
mcollina
commented
May 24, 2017
@mscdex updated. |
mscdex
commented
May 24, 2017
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/ |
cynron
commented
May 25, 2017
👌 |
mscdex
commented
May 25, 2017
@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
mcollina
commented
May 25, 2017
@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/ |
refack
commented
May 25, 2017
Ref: nodejs/build#720 (I have it in my TODO list to fix |
mcollina
commented
May 26, 2017
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
MylesBorins
commented
Jun 21, 2017
@nodejs/LTS We should not land this in v6.x yet |
mscdex
commented
Jun 21, 2017
@nodejs/lts ^ |
gibfahn
commented
Jun 21, 2017
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