Rectify value of `AdvertiseAddrWan` when set elsewhere
`AdvertiseAddrs` has been introduced as a configuration option, which duplicates a few other options, namely `AdvertiseAddrWan`. We need to use this value elsewhere, so rather than doing a precedence check every time we need to access it, rectify the value of `AdvertiseAddrWan` to match
This commit is contained in:
parent
e166d2a4c7
commit
d123b4dece
|
@ -287,6 +287,7 @@ func (a *Agent) consulConfig() *consul.Config {
|
|||
if a.config.AdvertiseAddrs.SerfWan != nil {
|
||||
base.SerfWANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddrs.SerfWan.IP.String()
|
||||
base.SerfWANConfig.MemberlistConfig.AdvertisePort = a.config.AdvertiseAddrs.SerfWan.Port
|
||||
a.config.AdvertiseAddrWan = a.config.AdvertiseAddrs.SerfWan.IP.String()
|
||||
}
|
||||
if a.config.AdvertiseAddrs.RPC != nil {
|
||||
base.RPCAdvertise = a.config.AdvertiseAddrs.RPC
|
||||
|
|
Loading…
Reference in New Issue