OK. It looks like I need to add code like this to the location node:
this.on('close', function(removed, done) {
if (removed) {
// This node has been disabled/deleted
} else {
// This node is being restarted
}
done();
});
However, I'm not sure how to identify the correct callback function to remove from the array in the server node... I suppose instead of an array of functions, I would create a hash, but what identifier for a location node can I send when adding the callback function? Is node.id
a thing?