Commit c224e1b
stream: fix deadlock when pipeing to full sink
When piping a paused Readable to a full Writable we didn't
register a drain listener which cause the src to never
resume.
Refs: #48666
PR-URL: #48691
Backport-PR-URL: #49323
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 9d90409 commit c224e1bCopy full SHA for c224e1b
File tree
Expand file treeCollapse file tree
2 files changed
+28
-3
lines changedOpen diff view settings
Filter options
- lib/internal/streams
- test/parallel
Expand file treeCollapse file tree
2 files changed
+28
-3
lines changedOpen diff view settings
Collapse file
lib/internal/streams/readable.js
Copy file name to clipboardExpand all lines: lib/internal/streams/readable.js+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
814 | 814 | |
815 | 815 | |
816 | 816 | |
817 | | - |
818 | | - |
819 | | - |
| 817 | + |
820 | 818 | |
821 | 819 | |
822 | 820 | |
|
Collapse file
test/parallel/test-stream-pipe-deadlock.js
Copy file name to clipboard+27Lines changed: 27 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 | + |
| 27 | + |
0 commit comments