agent: fix gossip encryption detection

pull/336/head
Ryan Uber 2014-10-11 17:29:24 -07:00
parent 8a652c6ffa
commit bc0eb4c16d
1 changed files with 6 additions and 3 deletions

View File

@ -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()