Skip to content

Commit

Permalink
Do not switch and remove node in one iteration (#11961)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
joerg1985 and diemol authored May 2, 2023
1 parent 83b0b0d commit 9ac368b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 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,8 @@ 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)) {
nodePurgeTimes.put(id, Instant.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 9ac368b

Please sign in to comment.