Skip to content

Commit 3b5e3c5

Browse files
committed
Fix crash when switching off internal address can't happen
If we think we're not on the internal network -- but there is no external URL to reach -- don't reset to external which doesn't exist, just keep using internal. This avoids an infinite loop.
1 parent c922bba commit 3b5e3c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Shared/Networking/ConnectionInfo.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ public class ConnectionInfo: Codable {
182182
self.activeURLType = .remoteUI
183183
} else if self.externalURL != nil {
184184
self.activeURLType = .external
185+
} else {
186+
// no change - we don't have one to switch to
187+
return url
185188
}
186189
return self.activeURL
187190
}

0 commit comments

Comments
 (0)