From 4d065beb43c51cbe34c4e48e806595a8b1daf154 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Fri, 27 May 2016 18:17:37 -0700 Subject: [PATCH] Unused code wasn't as unused as I thought. Restore. --- client/consul/sync.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/consul/sync.go b/client/consul/sync.go index 9fde90acaef..75312a36f7b 100644 --- a/client/consul/sync.go +++ b/client/consul/sync.go @@ -483,6 +483,12 @@ func (c *Syncer) filterConsulChecks(chks map[string]*consul.AgentCheck) map[stri return nomadChecks } +// consulPresent indicates whether the consul agent is responding +func (c *Syncer) consulPresent() bool { + _, err := c.client.Agent().Self() + return err == nil +} + // runCheck runs a check and updates the corresponding ttl check in consul func (c *Syncer) runCheck(check Check) { res := check.Run()