Add missing context in backoff for Marathon

This commit is contained in:
Romain 2022-08-12 10:44:08 +02:00 committed by GitHub
parent 868ab7a5c8
commit 6dd63e1702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,7 +192,7 @@ func (p *Provider) Provide(configurationChan chan<- dynamic.Message, pool *safe.
notify := func(err error, time time.Duration) { notify := func(err error, time time.Duration) {
logger.Errorf("Provider connection error %+v, retrying in %s", err, time) logger.Errorf("Provider connection error %+v, retrying in %s", err, time)
} }
err := backoff.RetryNotify(safe.OperationWithRecover(operation), job.NewBackOff(backoff.NewExponentialBackOff()), notify) err := backoff.RetryNotify(safe.OperationWithRecover(operation), backoff.WithContext(job.NewBackOff(backoff.NewExponentialBackOff()), ctx), notify)
if err != nil { if err != nil {
logger.Errorf("Cannot connect to Provider server: %+v", err) logger.Errorf("Cannot connect to Provider server: %+v", err)
} }