Changing it to set the timer only when the circuit first goes open

This commit is contained in:
wojciech.piotrowiak
2020-05-25 08:42:26 +02:00
committed by Dave Syer
parent 39cf01dc19
commit 010a75ce56

View File

@@ -152,8 +152,9 @@ public class CircuitBreakerRetryPolicy implements RetryPolicy {
if ((Boolean) getAttribute(CIRCUIT_OPEN) == false) {
logger.trace("Opening circuit");
setAttribute(CIRCUIT_OPEN, true);
this.start = System.currentTimeMillis();
}
this.start = System.currentTimeMillis();
return true;
}
}