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:
parent
971a62ebc9
commit
81dcfecb4e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user