fix: don't retry on panic

This commit is contained in:
Ludovic Fernandez 2022-08-29 11:36:08 +02:00 committed by GitHub
parent e56dfeb7d5
commit 25027d6df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"
)
@ -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())