Commit 6dc3c5e
doc: fix stream async iterator sample
The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.
Fixes: #31222
PR-URL: #31252
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent ec3dea1 commit 6dc3c5e
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2639 | 2639 | | |
2640 | 2640 | | |
2641 | 2641 | | |
2642 | | - | |
| 2642 | + | |
2643 | 2643 | | |
2644 | 2644 | | |
2645 | | - | |
| 2645 | + | |
| 2646 | + | |
2646 | 2647 | | |
| 2648 | + | |
2647 | 2649 | | |
2648 | 2650 | | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
2649 | 2654 | | |
2650 | | - | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
2651 | 2659 | | |
2652 | 2660 | | |
2653 | 2661 | | |
| |||
0 commit comments