SE.Redis Reconnect retry policy by deepakverma · Pull Request #510 · StackExchange/StackExchange.Redis
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this creates an object for the null case, the format should change a bit. Right now, it'll spin up a new LinearRetry on each property fetch - should capture it to the private when null, e.g. in the get:
return reconnectRetryPolicy ?? (reconnectRetryPolicy = new LinearRetry(ConnectTimeout));
Sidenote: I don't recommend the static default option, since it'd be a bad long-term assumption of a stateless retry policy. Would just approach this with the tweak above.