KM-17461: refetch servers if needed - #372
Conversation
|
Claude finished @kp-mario-nachbaur's task in 1m 15s —— View job PR Review: refetch servers if needed
Thanks Mario — the fix addresses the right root cause: when install fails because there are no servers, refetch the server list before retrying. The 🔴 Threading — UIKit called off the main thread
So private func refreshServersAndRetry() {
Client.providers.serverProvider.download { [weak self] (servers, error) in
DispatchQueue.main.async {
guard let self else { return }
if let servers, !servers.isEmpty {
self.submit()
} else {
if let error {
log.error("Failed to refetch servers: \(error)")
}
self.alertRequiredPermission()
}
}
}
}🟡 Discarded errorThe download error is currently ignored ( 🟡 Retry loop has no ceiling / backoffThe flow is:
This is user-gated (each iteration requires tapping OK, so it's not a tight infinite loop), and I understand the branch intent is an undismissable popup. Still, if the regions endpoint is persistently down, the only escape is "Contact support" (and that action only exists when ✅ Looks good
Testing suggestions
|
VPN installation fails because there is no target server and no servers in general. Retry after refetching servers.