From b758d56f71561cf8e630efabdf32f373546f92c7 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Fri, 5 Feb 2016 12:18:47 +0000 Subject: [PATCH] Correctly resolve app ids, fixes #825 --- probe/appclient/app_client.go | 1 - probe/appclient/multi_client.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/probe/appclient/app_client.go b/probe/appclient/app_client.go index 43cac073da..78f6503e8c 100644 --- a/probe/appclient/app_client.go +++ b/probe/appclient/app_client.go @@ -192,7 +192,6 @@ func (c *appClient) controlConnection() (bool, error) { return false, err } defer func() { - log.Printf("Closing control connection to %s", c.target) conn.Close() }() diff --git a/probe/appclient/multi_client.go b/probe/appclient/multi_client.go index 7ee020bbac..ca46f3b0b0 100644 --- a/probe/appclient/multi_client.go +++ b/probe/appclient/multi_client.go @@ -72,6 +72,7 @@ func (c *multiClient) Set(hostname string, endpoints []string) { go func(endpoint string) { c.sema.acquire() defer c.sema.release() + defer wg.Done() client, err := c.clientFactory(hostname, endpoint) if err != nil { @@ -82,10 +83,10 @@ func (c *multiClient) Set(hostname string, endpoints []string) { details, err := client.Details() if err != nil { log.Printf("Error fetching app details: %v", err) + return } clients <- clientTuple{details, client} - wg.Done() }(endpoint) }