Fix condition for external hostname in endpoints
This commit is contained in:
parent
bcc35fd8e5
commit
4afbe4aa4e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue