Log close errors rather than pass up the stack

pull/235/head^2
Nick O'Leary 2014-06-08 23:28:46 +01:00
parent fc94429266
commit dded87c134
1 changed files with 7 additions and 3 deletions

View File

@ -124,9 +124,13 @@ var flowNodes = module.exports = {
events.emit("nodes-stopping");
var promises = [];
for (var n in nodes) {
var p = nodes[n].close();
if (p) {
promises.push(p);
try {
var p = nodes[n].close();
if (p) {
promises.push(p);
}
} catch(err) {
nodes[n].error(err);
}
}
when.settle(promises).then(function() {