mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -404,7 +404,15 @@ function stop(type,diff,muteLog) {
|
||||
|
||||
events.emit("flows:stopping",{config: activeConfig, type: type, diff: diff})
|
||||
|
||||
for (var id in activeFlows) {
|
||||
// Stop the global flow object last
|
||||
let activeFlowIds = Object.keys(activeFlows);
|
||||
let globalIndex = activeFlowIds.indexOf("global");
|
||||
if (globalIndex !== -1) {
|
||||
activeFlowIds.splice(globalIndex,1);
|
||||
activeFlowIds.push("global");
|
||||
}
|
||||
|
||||
activeFlowIds.forEach(id => {
|
||||
if (activeFlows.hasOwnProperty(id)) {
|
||||
var flowStateChanged = diff && (diff.added.indexOf(id) !== -1 || diff.removed.indexOf(id) !== -1);
|
||||
log.debug("red/nodes/flows.stop : stopping flow : "+id);
|
||||
@@ -413,7 +421,7 @@ function stop(type,diff,muteLog) {
|
||||
delete activeFlows[id];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Promise.all(promises).then(function() {
|
||||
for (id in activeNodesToFlow) {
|
||||
|
||||
Reference in New Issue
Block a user