mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 07:41:17 +00:00
Merge pull request openziti/fabric#332 from openziti/331-router-link-listener-can-fail-to-infer-the-link-type-when-advertise-address-is-not-defined
331 - inferring link type from listener bind
This commit is contained in:
@@ -32,6 +32,7 @@ func loadListenerConfig(data map[interface{}]interface{}) (*listenerConfig, erro
|
||||
if address, err := transport.ParseAddress(addressString); err == nil {
|
||||
config.bind = address
|
||||
config.advertise = address
|
||||
config.linkType = address.Type()
|
||||
} else {
|
||||
return nil, fmt.Errorf("error parsing 'bind' address in listener config (%w)", err)
|
||||
}
|
||||
@@ -46,7 +47,6 @@ func loadListenerConfig(data map[interface{}]interface{}) (*listenerConfig, erro
|
||||
if addressString, ok := value.(string); ok {
|
||||
if address, err := transport.ParseAddress(addressString); err == nil {
|
||||
config.advertise = address
|
||||
config.linkType = address.Type()
|
||||
} else {
|
||||
return nil, fmt.Errorf("error parsing 'advertise' address in listener config")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user