Using the bindAddr only when user hasn't overrident it
This commit is contained in:
parent
26d9554d02
commit
e83130934d
|
@ -222,7 +222,11 @@ func (a *Agent) setupClient() error {
|
|||
conf.Node.Name = a.config.NodeName
|
||||
conf.Node.Meta = a.config.Client.Meta
|
||||
conf.Node.NodeClass = a.config.Client.NodeClass
|
||||
conf.Node.HTTPAddr = fmt.Sprintf("%s:%d", a.config.BindAddr, a.config.Ports.HTTP)
|
||||
httpAddr := a.config.BindAddr
|
||||
if a.config.Addresses.HTTP != "" {
|
||||
httpAddr = a.config.Addresses.HTTP
|
||||
}
|
||||
conf.Node.HTTPAddr = fmt.Sprintf("%s:%d", httpAddr, a.config.Ports.HTTP)
|
||||
|
||||
// Create the client
|
||||
client, err := client.NewClient(conf)
|
||||
|
|
Loading…
Reference in a new issue