From 952b6ce7b510081b689b146a8e2ac760f3061dee Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Thu, 16 Jun 2016 14:47:21 -0700 Subject: [PATCH] Only auto-join clients if `client_auto_join` is true --- client/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 4595a8b7b..48140e10b 100644 --- a/client/client.go +++ b/client/client.go @@ -1349,7 +1349,9 @@ func (c *Client) setupConsulSyncer() error { return nil } - c.consulSyncer.AddPeriodicHandler("Nomad Client Fallback Server Handler", bootstrapFn) + if c.config.ConsulConfig.ClientAutoJoin { + c.consulSyncer.AddPeriodicHandler("Nomad Client Fallback Server Handler", bootstrapFn) + } consulServicesReaperFn := func() error { const estInitialExecutorDomains = 8