From 5248bc0ff486fdce706b8a21f3de1d7e2531d7ae Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 12:49:20 -0700 Subject: [PATCH] Network Reconnection Delay Nucleic-Session: 4BE3E40C-E939-444C-8AED-93C0AFE13C07 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/HostConnection.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Models/HostConnection.swift b/NucleicRemote/NucleicRemote/Models/HostConnection.swift index 0644e40..7d8ce76 100644 --- a/NucleicRemote/NucleicRemote/Models/HostConnection.swift +++ b/NucleicRemote/NucleicRemote/Models/HostConnection.swift @@ -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 {