From 050decf1f27072911b021ff876edcb2499f550f0 Mon Sep 17 00:00:00 2001 From: james-2001 Date: Fri, 6 Jan 2023 11:13:18 +0000 Subject: [PATCH] #944- Added to readme explaining waitand/retryforever is not actually forever --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 48c8df590d8..a6e8ce64586 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,8 @@ Policy }); ``` +`RetryForever` does not actually retry forever; it will retry up to `int.MaxValue` (2147483647) times. Depending on what is done in the policy delegate this may take an exceedingly long time, but the policy will eventually hit `int.MaxValue` retries, get the last exception and stop retrying. + #### Wait and retry ```csharp @@ -323,6 +325,8 @@ Policy }); ``` +Similarly to `RetryForever`, `WaitAndRetryForever` only actually retries `int.MaxValue` times. + If all retries fail, a retry policy rethrows the final exception back to the calling code. For more depth see also: [Retry policy documentation on wiki](https://github.com/App-vNext/Polly/wiki/Retry).