Network Reconnection Delay

Nucleic-Session: 4BE3E40C-E939-444C-8AED-93C0AFE13C07
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 12:49:20 -07:00
co-authored by Nucleic
parent d07ab7ec98
commit 5248bc0ff4
@@ -706,7 +706,10 @@ final class HostConnection {
}
revalidateTask?.cancel()
revalidateTask = Task { [weak self] in
let alive = await client.probeAlive(within: .milliseconds(800))
// A generous bound on a pong round-trip (LAN <10ms, relay <200ms) — only paid in full
// when the link is actually dead; a live one answers and exits in ~1 RTT. Kept well
// under the follow-on re-dial so the whole dead-link reconnect stays sub-second.
let alive = await client.probeAlive(within: .milliseconds(600))
guard !Task.isCancelled, let self, self.client === client,
self.connectivity.isLive else { return }
if !alive {