Uh oh!
There was an error while loading. Please reload this page.
stream: fix async iterator return when destroyed earlier - #31508
stream: fix async iterator return when destroyed earlier#31508mcollina wants to merge 2 commits into
Conversation
This reverts commit d15b8ea.
mcollina
commented
Jan 25, 2020
(I've discovered this because one of my modules broke because of this change) |
nodejs-github-bot
commented
Jan 25, 2020
A test was missing for an async iterator created after the stream had emitted 'close'. This was regressed by nodejs#31314. See: nodejs#31314
34515ff to
638ba66Comparenodejs-github-bot
commented
Jan 25, 2020
ronag
left a comment
There was a problem hiding this comment.
LGTM.
An alternative is to add a closeEmitted property and sort out ‘finished’. But that’s a bigger change and maybe semver-major.
nodejs-github-bot
commented
Jan 25, 2020
nodejs-github-bot
commented
Jan 25, 2020
ronag
commented
Jan 26, 2020
Note, this might only be needed for 13.x if #31509 lands on master. |
Trott
commented
Jan 27, 2020
Perhaps we should add it to CITGM? |
This comment has been minimized.
This comment has been minimized.
mcollina
commented
Jan 27, 2020
I don't think it adds much right now. I had it using the node core stream module because readable-stream had async iterators still experimental. As for the fix, I just switched to use readable-stream instead. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
commented
Jan 29, 2020
Trott
commented
Jan 29, 2020
Landed in 64161f2...24e81d7 |
A test was missing for an async iterator created after the stream had emitted 'close'. This was regressed by #31314. See: #31314 PR-URL: #31508 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Previously finished(stream, cb) would not invoke the callback for streams that have already finished, ended or errored before being passed to finished(stream, cb). PR-URL: #31509 Refs: #31508 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
A test was missing for an async iterator created after the stream had emitted 'close'. This was regressed by #31314. See: #31314 PR-URL: #31508 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
A test was missing for an async iterator created after the stream had emitted 'close'. This was regressed by #31314. See: #31314 PR-URL: #31508 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Unfortunately, #31314 introduced a regression that made the loop not terminate:
I see that as more critical as an error not being forwarded. See #31314 (comment) for more details.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes