Commit 499c41d
stream: fix async iterator destroyed error propagation
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>1 parent 4981f97 commit 499c41dCopy full SHA for 499c41d
File tree
Expand file treeCollapse file tree
2 files changed
+30
-11
lines changedOpen diff view settings
Filter options
- lib/internal/streams
- test/parallel
Expand file treeCollapse file tree
2 files changed
+30
-11
lines changedOpen diff view settings
Collapse file
lib/internal/streams/async_iterator.js
Copy file name to clipboardExpand all lines: lib/internal/streams/async_iterator.js+13-11Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
78 | 78 | |
79 | 79 | |
80 | 80 | |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | 81 | |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
93 | 95 | |
94 | 96 | |
95 | 97 | |
|
Collapse file
test/parallel/test-stream-readable-async-iterators.js
Copy file name to clipboardExpand all lines: test/parallel/test-stream-readable-async-iterators.js+17Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
484 | 484 | |
485 | 485 | |
486 | 486 | |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
| 498 | + |
| 499 | + |
| 500 | + |
| 501 | + |
| 502 | + |
| 503 | + |
487 | 504 | |
488 | 505 | |
489 | 506 | |
|
0 commit comments