Fix condition for external hostname in endpoints

This commit is contained in:
Davide De Rosa 2019-04-26 15:29:50 +02:00
parent bcc35fd8e5
commit 4afbe4aa4e
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ public extension ProviderConnectionProfile {
var addresses: [String] { var addresses: [String] {
var addrs = pool?.addresses() ?? [] 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) addrs.insert(externalHostname, at: 0)
} }
return addrs return addrs