3 ms·
https://github.com/strongloop/zone/blob/master/showcase/long-stack-http/demo.js#L60 https://github.com/strongloop/zone/blob/master/showcase/long... <- this is t
by stormbrew 12y ago
https://github.com/strongloop/zone/blob/master/showcase/long-stack-http/demo.js#L60 https://github.com/strongloop/zone/blob/master/showcase/long... <- this is the line I was referring to.
I can see why it's doing it, actually, because the connection is presumably done at that point and an error after everything important is done is less important, but it's poorly explained at best (as being to prevent the 'zone from exploding').
- piscisaureus 12y agoWhen control reaches there we know something went wrong within the zone that's sending the response, so it's nice to send a HTTP 500 error back. However it could be that some data has already been sent back, in which case writeHead would throw. If that happens there isn't much more we can do.