stream: fix pipe deadlock when starting with needDrain#36563
stream: fix pipe deadlock when starting with needDrain#36563ronag wants to merge 4 commits intonodejs:masterfrom
Conversation
|
Missing test |
|
I've updated your test slightly to check for the deadlock: https://gist.github.com/bea83eb0dcbd0aea3b2689c2cd91bb38 |
62844f2 to
0996479
Compare
|
Seems like we may need to use common.mustCallAtLeast(1) instead of common.mustCall() because the latter requires it to be called exactly once, and it looks like the build system calls pause twice. |
|
@nodejs/streams |
This was also a separate bug. |
It's because pause is called when it's finishing (in unpipe) as well as in the pipe call - so your latest test code looks good to me. |
|
Landed in ab895bd |
Related Issues
Fixes: #36544
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes