Minors changes (#1059)

This commit is contained in:
Ludovic Fernandez 2020-02-10 18:20:52 +01:00 committed by GitHub
parent 8f349e5a5f
commit 2e30fd0ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 63 additions and 59 deletions

View file

@ -93,7 +93,6 @@ func (a *Core) retrievablePost(uri string, content []byte, response interface{})
switch err.(type) {
// Retry if the nonce was invalidated
case *acme.NonceError:
log.Infof("nonce error retry: %s", err)
return err
default:
cancel()
@ -104,7 +103,11 @@ func (a *Core) retrievablePost(uri string, content []byte, response interface{})
return nil
}
err := backoff.Retry(operation, backoff.WithContext(bo, ctx))
notify := func(err error, duration time.Duration) {
log.Infof("retry due to: %v", err)
}
err := backoff.RetryNotify(operation, backoff.WithContext(bo, ctx), notify)
if err != nil {
return nil, err
}