mirror of https://github.com/hashicorp/consul
agent: fix gossip encryption detection
parent
8a652c6ffa
commit
bc0eb4c16d
|
@ -612,9 +612,12 @@ func (c *Command) Run(args []string) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Figure out if gossip is encrypted
|
// Figure out if gossip is encrypted
|
||||||
gossipEncrypted := (config.Server &&
|
var gossipEncrypted bool
|
||||||
c.agent.server.Encrypted() ||
|
if config.Server {
|
||||||
c.agent.client.Encrypted())
|
gossipEncrypted = c.agent.server.Encrypted()
|
||||||
|
} else {
|
||||||
|
gossipEncrypted = c.agent.client.Encrypted()
|
||||||
|
}
|
||||||
|
|
||||||
// Let the agent know we've finished registration
|
// Let the agent know we've finished registration
|
||||||
c.agent.StartSync()
|
c.agent.StartSync()
|
||||||
|
|
Loading…
Reference in New Issue