Skip to content

Commit

Permalink
Do not switch and remove node in one iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg1985 committed Apr 27, 2023
1 parent ef69f1b commit 6cccb39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions java/src/org/openqa/selenium/grid/distributor/GridModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ public void purgeDeadNodes() {
if (node.getAvailability() == UP && lostTime.isBefore(now)) {
LOG.info(String.format("Switching Node %s from UP to DOWN", node.getExternalUri()));
replacements.put(node, rewrite(node, DOWN));
}
if (node.getAvailability() == DOWN && deadTime.isBefore(now)) {
} else if (node.getAvailability() == DOWN && deadTime.isBefore(now)) {
LOG.info(String.format("Removing Node %s, DOWN for too long", node.getExternalUri()));
toRemove.add(node);
}
Expand Down

0 comments on commit 6cccb39

Please sign in to comment.