stream: avoid pause with unpipe in buffered write
authorBrian White <mscdex@mscdex.net>
Sun, 11 Oct 2015 18:06:17 +0000 (14:06 -0400)
committerJames M Snell <jasnell@gmail.com>
Mon, 12 Oct 2015 13:38:27 +0000 (06:38 -0700)
commit7b9f78acb28ba6f6fa0f82ce70abcc9ab327212e
tree108d15926ea23f345f461edab10a45cb11860656
parent54795620f652271840b400b6f6d7581d128d5628
stream: avoid pause with unpipe in buffered write

If a pipe is cleaned up (due to unpipe) during a write that
returned false, the source stream can get stuck in a paused state.

Fixes: https://github.com/nodejs/node/issues/2323
PR-URL: https://github.com/nodejs/node/pull/2325
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
lib/_stream_readable.js
test/parallel/test-stream-pipe-cleanup-pause.js [new file with mode: 0644]