joyent/node — pull request #6122 by lfortin (2013-08-26 02:10:41+00:00)
Title: Transform: prevent endless pipe loop

This is for the (absurd) case where a Transform(or PassThrough) stream is piped into itself.

var through = new stream.PassThrough();
through.pipe(through);
through.write("hello world"); // infinite loop

The patch will:

-prevent the process to freeze;
-prevent the pipe action;
-throw an error