We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2ca5d86 + ff4f44a commit c186f01Copy full SHA for c186f01
plugin/circuitbreaker/composite/rule.go
@@ -163,13 +163,13 @@ func (c *RuleContainer) realRefreshHealthCheck() {
163
}
164
165
func selectCircuitBreakerRule(res model.Resource, object *model.ServiceRuleResponse, regexFunc func(string) *regexp.Regexp) *fault_tolerance.CircuitBreakerRule {
166
- if object == nil {
+ if object == nil || object.Value == nil {
167
return nil
168
169
- if object.Value == nil {
+ circuitBreaker, ok := object.Value.(*fault_tolerance.CircuitBreaker)
170
+ if !ok || circuitBreaker == nil {
171
172
- circuitBreaker := object.Value.(*fault_tolerance.CircuitBreaker)
173
rules := circuitBreaker.Rules
174
if len(rules) == 0 {
175
0 commit comments