Commit bc0d95cc authored by Nick Craver's avatar Nick Craver

Cleanup: ExponentialRetry

parent 579f5dd8
...@@ -7,8 +7,8 @@ namespace StackExchange.Redis ...@@ -7,8 +7,8 @@ namespace StackExchange.Redis
/// </summary> /// </summary>
public class ExponentialRetry : IReconnectRetryPolicy public class ExponentialRetry : IReconnectRetryPolicy
{ {
private int deltaBackOffMilliseconds; private readonly int deltaBackOffMilliseconds;
private int maxDeltaBackOffMilliseconds = (int)TimeSpan.FromSeconds(10).TotalMilliseconds; private readonly int maxDeltaBackOffMilliseconds = (int)TimeSpan.FromSeconds(10).TotalMilliseconds;
[ThreadStatic] [ThreadStatic]
private static Random r; private static Random r;
...@@ -16,9 +16,7 @@ public class ExponentialRetry : IReconnectRetryPolicy ...@@ -16,9 +16,7 @@ public class ExponentialRetry : IReconnectRetryPolicy
/// Initializes a new instance using the specified back off interval with default maxDeltaBackOffMilliseconds of 10 seconds /// Initializes a new instance using the specified back off interval with default maxDeltaBackOffMilliseconds of 10 seconds
/// </summary> /// </summary>
/// <param name="deltaBackOffMilliseconds">time in milliseconds for the back-off interval between retries</param> /// <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> /// <summary>
/// Initializes a new instance using the specified back off interval. /// 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