Skip to content

Commit

Permalink
fix: don't retry on panic
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Aug 29, 2022
1 parent e56dfeb commit 25027d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/middlewares/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/traefik/traefik/v2/pkg/config/dynamic"
"github.com/traefik/traefik/v2/pkg/log"
"github.com/traefik/traefik/v2/pkg/middlewares"
"github.com/traefik/traefik/v2/pkg/safe"
"github.com/traefik/traefik/v2/pkg/tracing"
)

Expand Down Expand Up @@ -118,7 +117,7 @@ func (r *retry) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
r.listener.Retried(req, attempts)
}

err := backoff.RetryNotify(safe.OperationWithRecover(operation), backOff, notify)
err := backoff.RetryNotify(operation, backOff, notify)
if err != nil {
log.FromContext(middlewares.GetLoggerCtx(req.Context(), r.name, typeName)).
Debugf("Final retry attempt failed: %v", err.Error())
Expand Down

0 comments on commit 25027d6

Please sign in to comment.