With this code where deliberately I create some error, why nodejs/socket.io stop respond to the client? Note that nodejs process still up and nothing crash nor exit.
socket.on('message', function (data) {
var d = domain.create();
d.on('error', function(err) {
socket.emit('error', err.message);
});
d.run(function() {
execError();
}
});
Everything ok, was my code that create the issue.
More here about domains:
http://blog.evantahler.com/blog/on-domains-and-connections-with-node-js.html