Skip to content

Commit

Permalink
fix(gateway): don't skip retry policy with retry methods (#6896)
Browse files Browse the repository at this point in the history
1. The logic was wrong - if there is ***NO*** retry policy, we should
   skip applying retriable methods, not the other way around
2. Before it might crash with nil pointer dereference when we provided
   httpMethods, but there was no retry policy

Signed-off-by: Bart Smykla <bartek@smykla.com>
  • Loading branch information
bartsmykla authored and kumahq[bot] committed Jun 1, 2023
1 parent e3ea9db commit d9665b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugins/runtime/gateway/route/configurers.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func RouteActionRetryMethods(httpMethod ...string) RouteConfigurer {

return RouteConfigureFunc(func(r *envoy_config_route.Route) error {
p := r.GetRoute().GetRetryPolicy()
if p != nil {
if p == nil {
return nil
}

Expand Down

0 comments on commit d9665b0

Please sign in to comment.