mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Log close errors rather than pass up the stack
This commit is contained in:
parent
fc94429266
commit
dded87c134
@ -124,10 +124,14 @@ var flowNodes = module.exports = {
|
|||||||
events.emit("nodes-stopping");
|
events.emit("nodes-stopping");
|
||||||
var promises = [];
|
var promises = [];
|
||||||
for (var n in nodes) {
|
for (var n in nodes) {
|
||||||
|
try {
|
||||||
var p = nodes[n].close();
|
var p = nodes[n].close();
|
||||||
if (p) {
|
if (p) {
|
||||||
promises.push(p);
|
promises.push(p);
|
||||||
}
|
}
|
||||||
|
} catch(err) {
|
||||||
|
nodes[n].error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
when.settle(promises).then(function() {
|
when.settle(promises).then(function() {
|
||||||
events.emit("nodes-stopped");
|
events.emit("nodes-stopped");
|
||||||
|
Loading…
Reference in New Issue
Block a user