Closed mcollina closed 9 years ago
I am ok to submit a PR on this issue, if you think this should be addressed.
Or should I resubmit this into the iojs repo?
Closing and resubmitting to iojs, as it might be the best place to address this anyway.
I wanted something like this in node, but for some reason the issue was closed by @chrisdickinson. See https://github.com/joyent/node/issues/5920.
I reposted on iojs: https://github.com/nodejs/io.js/issues/1746
In case the streams errors, e.g. for a broken TCP socket, or an application error, all buffered write callbacks are never called, here is an example:
The actual code I am using to fix this behavior is https://github.com/mcollina/aedes/blob/master/lib/client.js#L87-L91.
I spoke to @mafintosh about this one at a couple of conference, so better log it here (and maybe resolve it).