Refactor resolver logic to be clearer

This commit is contained in:
Paul Banks 2018-06-08 22:41:16 +01:00 committed by Jack Pearkes
parent 3433020fa6
commit f6a804029f
1 changed files with 3 additions and 3 deletions

View File

@ -171,9 +171,9 @@ func (cr *ConsulResolver) resolveServiceEntry(entry *api.ServiceEntry) (string,
}
port := entry.Service.Port
service := entry.Service.Service
if entry.Service.Connect != nil && !entry.Service.Connect.Native {
service = entry.Service.ProxyDestination
service := entry.Service.ProxyDestination
if entry.Service.Connect != nil && entry.Service.Connect.Native {
service = entry.Service.Service
}
// Generate the expected CertURI