mirror of https://github.com/status-im/consul.git
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
069a28b3c0
commit
8fa2a60208
|
@ -287,6 +287,7 @@ func (a *Agent) consulConfig() *consul.Config {
|
||||||
if a.config.AdvertiseAddrs.SerfWan != nil {
|
if a.config.AdvertiseAddrs.SerfWan != nil {
|
||||||
base.SerfWANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddrs.SerfWan.IP.String()
|
base.SerfWANConfig.MemberlistConfig.AdvertiseAddr = a.config.AdvertiseAddrs.SerfWan.IP.String()
|
||||||
base.SerfWANConfig.MemberlistConfig.AdvertisePort = a.config.AdvertiseAddrs.SerfWan.Port
|
base.SerfWANConfig.MemberlistConfig.AdvertisePort = a.config.AdvertiseAddrs.SerfWan.Port
|
||||||
|
a.config.AdvertiseAddrWan = a.config.AdvertiseAddrs.SerfWan.IP.String()
|
||||||
}
|
}
|
||||||
if a.config.AdvertiseAddrs.RPC != nil {
|
if a.config.AdvertiseAddrs.RPC != nil {
|
||||||
base.RPCAdvertise = a.config.AdvertiseAddrs.RPC
|
base.RPCAdvertise = a.config.AdvertiseAddrs.RPC
|
||||||
|
|
Loading…
Reference in New Issue