1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Catch very early exit null pointer when ctrl-c hit during startup.

This commit is contained in:
dceejay 2015-03-02 17:32:22 +00:00
parent 971a62ebc9
commit 81dcfecb4e

View File

@ -139,14 +139,18 @@ var flowNodes = module.exports = {
}
}
}
},
stopFlows: function() {
log.info("Stopping flows");
return activeFlow.stop().then(function() {
log.info("Stopped flows");
if (activeFlow) {
return activeFlow.stop().then(function() {
log.info("Stopped flows");
return;
});
} else {
log.info("Stopped");
return;
});
}
},
handleError: function(node,logMessage,msg) {
activeFlow.handleError(node,logMessage,msg);
@ -154,4 +158,3 @@ var flowNodes = module.exports = {
};
var activeFlow = null;