{"version":"2.1.222","anchor":"heartbeat-failure-streak-detection-in-the-ccr-client","canonical_anchor":"heartbeat-failure-streak-detection-in-the-ccr-client","heading":"Heartbeat-failure streak detection in the CCR client","tier":"internal","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.222\/e\/heartbeat-failure-streak-detection-in-the-ccr-client","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.222","markdown":"### Heartbeat-failure streak detection in the CCR client\n\nDropped connections are detected by counting repeated heartbeat failures instead of reacting to one.\n\n**What**\n\nFailed heartbeat POSTs are no longer fire-and-forget; the client tracks a failure streak and reports it upward once it is long enough to matter.\n\n**Details**\n\n- a set of statuses is ignored outright\n- checks `isReadStreamRecentlyAlive()` before counting, then increments `consecutiveHeartbeatFailures`\n- fires `onHeartbeatLost` only once the streak passes both a count and a duration threshold\n- a successful heartbeat calls `resetHeartbeatStreak()`\n- the onHeartbeatLost handler is only installed when selfHealHeartbeats is on\n\n**Evidence**\n\n`this.onHeartbeatLost?.()`\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 0\/5"}