unpipe and on("data" #34

Closed
Raynos opened this Issue Nov 24, 2012 · 1 comment

2 participants

@Raynos

Imagine the following

var stream = Nice()

stream.on("data", function () {
    stream.close()
})

function Nice() {
    var readable = createReadStream(...)
        , writable = createWriteStream(...)

    readable.pipe(writable)

    readable.close = function () {
        readable.unpipe(writable)
        readable.emit("end")
    }
}

If a user turns my streams2 module into "classic stream" mode by adding a data listener.

Should the new unpipe method work as expected?

@rvagg
Node.js Foundation member

closing this assuming it's stale, open against joyent/node if there's still something to discuss.

@rvagg rvagg closed this Jan 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment