function trap
hnistray opened this issue · 0 comments
hnistray commented
CircuitBreaker.IsOpen() is not read only, so when call it before hystrix.Go or hystrix.Do maybe circuit status is changed. some smell code in this function, snippet as:
if !circuit.metrics.IsHealthy(time.Now()) {
// too many failures, open the circuit
circuit.setOpen()
return true
}