Avoid infinite loop in web ui when pipeline has loops
Signed-off-by: Richard Bradley <Richard.Bradley@softwire.com>
This commit is contained in:
parent
749db38c3e
commit
935f9d6fa0
|
@ -226,6 +226,13 @@ Graph.prototype.computeRanks = function() {
|
|||
// ranks, so always destination nodes as far to the right as possible
|
||||
nextNode._cachedRank = Math.max(nextNode._cachedRank, node._cachedRank + 1);
|
||||
|
||||
if (nextNode._cachedRank > 10000) {
|
||||
throw new Error(
|
||||
"Likely infinite loop involving: [" +
|
||||
node.id + "] and [" +
|
||||
nextNode.id + "]");
|
||||
}
|
||||
|
||||
nextNodes[nextNode.id] = nextNode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue