stream: Correct Transform class backpressure
authorisaacs <i@izs.me>
Sun, 27 Jan 2013 19:56:36 +0000 (11:56 -0800)
committerisaacs <i@izs.me>
Mon, 28 Jan 2013 16:40:45 +0000 (08:40 -0800)
commite26622bd18fc86033cea393125cad49c577b524b
treeccb7dcc9f523f5eabad5862b88ea61545ba111cf
parent0d7a0216dc8e0d79bdc32aa7c48097bebfcba8eb
stream: Correct Transform class backpressure

The refactor in b43e544140ccf68580c02e71c56d19b82e1e1d32 to use
stream.push() in Transform inadvertently caused it to immediately
consume all the written data, regardless of whether or not the readable
side was being consumed.

Only pull data through the _transform() process when the readable side
is being consumed.

Fix #4667
lib/_stream_transform.js
test/simple/test-stream2-transform.js