Commit bc0d95cc authored by Nick Craver's avatar Nick Craver

Cleanup: ExponentialRetry

parent 579f5dd8
......@@ -7,8 +7,8 @@ namespace StackExchange.Redis
/// </summary>
public class ExponentialRetry : IReconnectRetryPolicy
{
private int deltaBackOffMilliseconds;
private int maxDeltaBackOffMilliseconds = (int)TimeSpan.FromSeconds(10).TotalMilliseconds;
private readonly int deltaBackOffMilliseconds;
private readonly int maxDeltaBackOffMilliseconds = (int)TimeSpan.FromSeconds(10).TotalMilliseconds;
[ThreadStatic]
private static Random r;
......@@ -16,9 +16,7 @@ public class ExponentialRetry : IReconnectRetryPolicy
/// Initializes a new instance using the specified back off interval with default maxDeltaBackOffMilliseconds of 10 seconds
/// </summary>
/// <param name="deltaBackOffMilliseconds">time in milliseconds for the back-off interval between retries</param>
public ExponentialRetry(int deltaBackOffMilliseconds) : this(deltaBackOffMilliseconds, (int)TimeSpan.FromSeconds(10).TotalMilliseconds)
{
}
public ExponentialRetry(int deltaBackOffMilliseconds) : this(deltaBackOffMilliseconds, (int)TimeSpan.FromSeconds(10).TotalMilliseconds) {}
/// <summary>
/// Initializes a new instance using the specified back off interval.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment