Commit 1655532
stream: don't push null from closed promise #42694
closed promise is subscribed to first so will be
resolved first, before any read promise.
This causes data after EOF error to be thrown.
Remove the push null from the closed promise handler.
The push null gets done from the read handler
when it detects done.
PR-URL: #45026
Fixes: #42694
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 809e8dc commit 1655532Copy full SHA for 1655532
File tree
Expand file treeCollapse file tree
2 files changed
+26
-5
lines changedOpen diff view settings
Filter options
- lib/internal/webstreams
- test/parallel
Expand file treeCollapse file tree
2 files changed
+26
-5
lines changedOpen diff view settings
Collapse file
lib/internal/webstreams/adapters.js
Copy file name to clipboardExpand all lines: lib/internal/webstreams/adapters.js-5Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | | - |
36 | 35 | |
37 | 36 | |
38 | 37 | |
| ||
528 | 527 | |
529 | 528 | |
530 | 529 | |
531 | | - |
532 | | - |
533 | 530 | |
534 | 531 | |
535 | 532 | |
| ||
794 | 791 | |
795 | 792 | |
796 | 793 | |
797 | | - |
798 | | - |
799 | 794 | |
800 | 795 | |
801 | 796 | |
|
Collapse file
test/parallel/test-readable-from-web-enqueue-then-close.js
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
0 commit comments