Commit ec219272 authored by gejun's avatar gejun

fix code style issues in circuit_breaker.cpp

parent ce503273
...@@ -155,14 +155,14 @@ bool CircuitBreaker::OnCallEnd(int error_code, int64_t latency) { ...@@ -155,14 +155,14 @@ bool CircuitBreaker::OnCallEnd(int error_code, int64_t latency) {
if (_broken.load(butil::memory_order_relaxed)) { if (_broken.load(butil::memory_order_relaxed)) {
return false; return false;
} }
if (!_long_window.OnCallEnd(error_code, latency) || if (_long_window.OnCallEnd(error_code, latency) &&
!_short_window.OnCallEnd(error_code, latency)) { _short_window.OnCallEnd(error_code, latency)) {
return true;
}
if (!_broken.exchange(true, butil::memory_order_acquire)) { if (!_broken.exchange(true, butil::memory_order_acquire)) {
UpdateIsolationDuration(); UpdateIsolationDuration();
} }
return false; return false;
}
return true;
} }
void CircuitBreaker::Reset() { void CircuitBreaker::Reset() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment