Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upes.fork #12
Comments
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
the code you give here will just work, unless there is an error. if you are worried about an error maybe you could do this: stream.pipe(one)
stream.pipe(two)
one.removeAllListeners('error')
one.on('error', function () {
//do what you gotta do.
one.destroy() //cleanup one...
})
this will dump currently pipe always assigns an error listener, I've been wandering if that should be optional. |
right9ctrl
closed this
Sep 6, 2018
right9ctrl
referenced this issue
Sep 6, 2018
Closed
How to keep the original stream data unchanged? #108
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tblobaum commentedJul 13, 2012
I would like to be able to fork a stream so it can be piped to two places at the same time, is there an easy way to do this already? In consuming a stream I'd like to fork it one direction to save the data in a temporary place until the other fork has been successfully processed.