stream: destroy Duplex.from async function on early return · nodejs/node@1260642 · GitHub
Skip to content

Commit 1260642

Browse files
ac-mmiaduh95
authored andcommitted
stream: destroy Duplex.from async function on early return
When an AsyncFunction passed to Duplex.from() resolves without consuming its input, tear down the duplex so pipeline() can finish and destroy the upstream readable. Fixes: #55077 Assisted-by: Cursor Signed-off-by: Aman Chadha <79802170+ac-mmi@users.noreply.github.com> PR-URL: #65963 Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
1 parent a794e36 commit 1260642

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎lib/internal/streams/duplexify.js‎

Lines changed: 9 additions & 0 deletions

‎test/parallel/test-stream-duplex-from.js‎

Lines changed: 16 additions & 0 deletions

0 commit comments

Comments
 (0)