joyent/node — pull request #4904 by isaacs (2013-03-03 02:03:37+00:00)
Title: stream: Writable.end(chunk) after end is an error

Calling end(data) calls write(data). Doing this after end should
raise a 'write after end' error.

However, because end() calls were previously ignored on already
ended streams, this error was confusingly suppressed, even though the
data never is written, and cannot get to the other side.

This is a re-hash of 5222d19a11ed0e29d207da0e8c9c8e0e3b18ad78, but
without assuming that the data passed to end() is valid, and thus
breaking a bunch of tests.

The relevant diff from that commit is https://gist.github.com/isaacs/5074143