diff --git a/plugin/circuitbreaker/composite/counter.go b/plugin/circuitbreaker/composite/counter.go index d8965fed..4cbc0dcc 100644 --- a/plugin/circuitbreaker/composite/counter.go +++ b/plugin/circuitbreaker/composite/counter.go @@ -132,8 +132,10 @@ func (rc *ResourceCounters) CurrentCircuitBreakerStatus() model.CircuitBreakerSt if val == nil { return nil } - wrapper := val.(*model.CircuitBreakerStatusWrapper) - return wrapper.Val + if wrapper, ok := val.(*model.CircuitBreakerStatusWrapper); ok { + return wrapper.Val + } + return nil } func (rc *ResourceCounters) CloseToOpen(breaker string) {