joyent/node — pull request #5215 by gne (2013-04-03 23:09:51+00:00)
Title: stream: call write's callback before end's callback

Since commit joyent/node@049903e an end callback could be called before a write callback, if end() is called before the write is done. This patch makes sure write's callback is called before end's callback.

This patch should fix the issue discussed in felixge/node-formidable#209.