Previously, failover only triggered when ConnectAsync failed consecutively. If a connection succeeded but went stale quickly (e.g., heartbeat timeout), the failure counter reset on each successful connect and failover never triggered. Added a separate _consecutiveUnstableDisconnects counter that increments when a connection lasts less than StableConnectionThreshold (60s) before disconnecting. When this counter reaches failoverRetryCount, the actor fails over to the backup endpoint. Stable connections (lasting >60s) reset this counter. The original connection-failure failover path is unchanged.
28 KiB
28 KiB