From bc0eb4c16d026ddb979b5e966b8b98d41a8c0de0 Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Sat, 11 Oct 2014 17:29:24 -0700 Subject: [PATCH] agent: fix gossip encryption detection --- command/agent/command.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/command/agent/command.go b/command/agent/command.go index 6d9da74da1..a62dbdd672 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -612,9 +612,12 @@ func (c *Command) Run(args []string) int { } // Figure out if gossip is encrypted - gossipEncrypted := (config.Server && - c.agent.server.Encrypted() || - c.agent.client.Encrypted()) + var gossipEncrypted bool + if config.Server { + gossipEncrypted = c.agent.server.Encrypted() + } else { + gossipEncrypted = c.agent.client.Encrypted() + } // Let the agent know we've finished registration c.agent.StartSync()