Fix: Respect IReconnectRetryPolicy in disconnect loops by NickCraver · Pull Request #2853 · StackExchange/StackExchange.Redis (original) (raw)

Fixes the case where we loop from Connecting -> BeginConnectAsync -> OnDisconnected and the next heartbeat triggers a reconnect again due to the backoff thresholds resetting. This ultimately causes the backoff to not be respected.

Here, we're doing 2 things: