From 475447d1037531ab10324556d630f14555cba8ab Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 13:36:37 -0700 Subject: [PATCH] Network Connection Logic Enhancement Nucleic-Session: 93A70648-2057-4092-9372-860E1BA151D8 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/HostConnection.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Models/HostConnection.swift b/NucleicRemote/NucleicRemote/Models/HostConnection.swift index cd74552..4083836 100644 --- a/NucleicRemote/NucleicRemote/Models/HostConnection.swift +++ b/NucleicRemote/NucleicRemote/Models/HostConnection.swift @@ -773,6 +773,10 @@ final class HostConnection { reconnect(to: host) return } + // Already live — but if we're on a fallback transport and a LAN path exists now, try to move + // back to the direct connection (foregrounding on the Mac's Wi-Fi after being away on cellular, + // where no path-change event fired while suspended). + maybeUpgradeToLAN() revalidateTask?.cancel() revalidateTask = Task { [weak self] in // A generous bound on a pong round-trip (LAN <10ms, relay <200ms) — only paid in full