joyent/node — pull request #4832 by isaacs (2013-02-22 18:39:25+00:00)
Title: http: Handle hangup writes more gently

I'm not 100% sure that this is a good idea.

It's somewhat nice to be alerted that your write was not ever received. And certainly, throwing an error (v0.8.20) is better than leaking memory (v0.8.19).

However, the introduction of a new error in this case is very shocking to people, and is causing some hardships. Perhaps it would be nicer to treat an ECONNRESET as a close, and prevent data from being buffered forever, while ensuring that the `'close'` will actually get emitted.

What do you think?

cc: @bnoordhuis @davepacheco @dannycoates @mcavage