diff --git a/math/src/main/java/com/powsybl/math/graph/UndirectedGraphImpl.java b/math/src/main/java/com/powsybl/math/graph/UndirectedGraphImpl.java index 5dd0441df22..f12c2310143 100644 --- a/math/src/main/java/com/powsybl/math/graph/UndirectedGraphImpl.java +++ b/math/src/main/java/com/powsybl/math/graph/UndirectedGraphImpl.java @@ -518,7 +518,6 @@ public boolean traverse(int v, TraversalType traversalType, Traverser traverser, TraverseResult traverserResult = traverser.traverse(v2, e, v1); if (traverserResult == TraverseResult.CONTINUE) { vertexToTraverse.offer(v1); - keepGoing = true; } else if (traverserResult == TraverseResult.TERMINATE_TRAVERSER) { keepGoing = false; } @@ -526,7 +525,6 @@ public boolean traverse(int v, TraversalType traversalType, Traverser traverser, TraverseResult traverserResult = traverser.traverse(v1, e, v2); if (traverserResult == TraverseResult.CONTINUE) { vertexToTraverse.offer(v2); - keepGoing = true; } else if (traverserResult == TraverseResult.TERMINATE_TRAVERSER) { keepGoing = false; }