stream: fix async iterator destroyed error propagation by ronag · Pull Request #31700 · nodejs/node

@ronag

There was an edge case where if _destroy calls the error callback
later than one tick the iterator would complete early and not
propgate the error.

PR-URL: nodejs#31314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

addaleax

@BridgeAR BridgeAR added author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

stream

Issues and PRs related to the stream subsystem.

labels

Feb 9, 2020

mcollina

ronag added a commit that referenced this pull request

Feb 14, 2020
There was an edge case where if _destroy calls the error callback
later than one tick the iterator would complete early and not
propgate the error.

PR-URL: #31314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

PR-URL: #31700
Reviewed-By: Anna Henningsen <anna@addaleax.net>