That may work, but that does not resolve the situation. I would like to know when the WritableStream `res` (which it is) is no longer writable. The documentation stipulates that it should emit a `close` event, but it does not.
This means that it's a bug by definition, right? Anyway, I do not know if the underlying socket actually closing also means that the response cannot be written to anymore at this exact point, or if the response was closed somewhat earlier already. Therefore I do not think it is appropriate to listen to the underlying socket: the higher level response may be unwritable earlier than that. Tom Op woensdag 7 november 2012 03:03:05 UTC+7 schreef mscdex het volgende: > > On Nov 6, 11:01 am, Tom <[email protected]> wrote: > > I'm afraid that the `close` event does not emit either, as becomes clear > > when hooking into the emit function as described earlier. > > > > Only `header` and `finish` emit. > > > > Why is this so? > > What if you inspect events emitted on the underlying socket object > (req/res.socket or req/res.connection)? > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
