Closed ggiamarchi closed 9 years ago
I think actually it might be better to check the state portion of this at the top of the method rather than after the state change/previous state capture.
public void trip() { if (state != BreakerState.OPEN) { openCount.getAndIncrement(); }
BreakerState previousState = state; state = BreakerState.OPEN; lastFailure.set(System.currentTimeMillis()); isAttemptLive = false; ....
Does this make sense?
You're right. Pull request updated.
Fix #32