Dropped connections are detected by counting repeated heartbeat failures instead of reacting to one.
What's wrong with this entry?
Failed 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.
- a set of statuses is ignored outright
- checks
isReadStreamRecentlyAlive()before counting, then incrementsconsecutiveHeartbeatFailures - fires
onHeartbeatLostonly once the streak passes both a count and a duration threshold - a successful heartbeat calls
resetHeartbeatStreak() - the onHeartbeatLost handler is only installed when selfHealHeartbeats is on
this.onHeartbeatLost?.()
Strings lifted out of the shipped bundle, so the claim above can be checked against them.