From 4afbe4aa4e96c72a7112497980a7079f7425020d Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 26 Apr 2019 15:29:50 +0200 Subject: [PATCH] Fix condition for external hostname in endpoints --- .../Sources/Model/Profiles/ProviderConnectionProfile.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift b/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift index 9e4ca9d1..ba7b0bae 100644 --- a/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift +++ b/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift @@ -176,7 +176,7 @@ public extension ProviderConnectionProfile { var addresses: [String] { var addrs = pool?.addresses() ?? [] - if addrs.isEmpty, let pool = pool, !(pool.isResolved ?? false), let externalHostname = try? preset?.externalConfiguration(forKey: .hostname, infrastructureName: infrastructure.name, pool: pool) as? String { + if let pool = pool, pool.hostname == nil, !(pool.isResolved ?? false), let externalHostname = try? preset?.externalConfiguration(forKey: .hostname, infrastructureName: infrastructure.name, pool: pool) as? String { addrs.insert(externalHostname, at: 0) } return addrs