pipe broken
src.pipe(dest)
If dest emits close or error or finish the pipe is not cleaned up.
Meaning the src will continue writing to a broken stream
I'm suffering this issue in my code. Say we've got
src1.pipe(transform1).pipe(transform2).pipe(dest1);
Then transform2 does not get cleaned up (e.g., transform._flush does not get called) nor dest1 gets closed. You can checkout https://github.com/pablocaselas/stream-transform-bug for a working example with streams2. Tested also with readable-stream with same result. @pablocaselas created a similar issue to the node team: https://github.com/joyent/node/issues/6739
Posible fixes seem to be, IMHO:
stream.once"error","close"and"finish"onReadable.pipe- At least
stream.emit("end")inWritableas well as"finish"(in functionfinishMaybe(stream, state)).
My fix is incorrect. My issue was related to not implementing flush correctly. Sorry for the noise.
file report against joyent/node if this is still a problem.