From cc9569c7a11ab2109bb272534ee823304adf2d4b Mon Sep 17 00:00:00 2001 From: Igor Lyadov Date: Fri, 17 Jul 2020 07:40:52 +0300 Subject: [PATCH] Fixed retryWithBackoffAndOverallTimeout example in doc --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79d4de0..304b6a8 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,8 @@ If the overall amount of time that an exponential-backoff retry policy could tak var retryWithBackoff = Policy .Handle() .WaitAndRetryAsync(Backoff.ExponentialBackoff(TimeSpan.FromSeconds(1), retryCount: 5)); - var timeout = Policy.Timeout(TimeSpan.FromSeconds(45)); - var retryWithBackoffAndOverallTimeout = timeout.Wrap(retryWithBackoff); + var timeout = Policy.TimeoutAsync(TimeSpan.FromSeconds(45)); + var retryWithBackoffAndOverallTimeout = timeout.WrapAsync(retryWithBackoff); When the combined time taken to make tries and wait between them exceeds 45 seconds, the TimeoutPolicy will be invoked and cause the current try and further retries to be abandoned.