From 5ec92971ac6705e2bcea3c3baacb53c55038e590 Mon Sep 17 00:00:00 2001 From: artushin Date: Wed, 11 Feb 2015 18:29:51 -0600 Subject: [PATCH 1/2] close idle connections after stopping http checks to service --- command/agent/check.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command/agent/check.go b/command/agent/check.go index 352c986fe3..ff95272cc4 100644 --- a/command/agent/check.go +++ b/command/agent/check.go @@ -325,6 +325,7 @@ func (c *CheckHTTP) run() { c.check() next = time.After(c.Interval) case <-c.stopCh: + c.httpClient.Transport.(*http.Transport).CloseIdleConnections() return } } From 2ae843d51c55802c0ac9f7337e6c6ec6d862e432 Mon Sep 17 00:00:00 2001 From: artushin Date: Thu, 12 Feb 2015 10:11:22 -0600 Subject: [PATCH 2/2] oops. DefaultTransport being used. --- command/agent/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/check.go b/command/agent/check.go index ff95272cc4..ef0eea3ad1 100644 --- a/command/agent/check.go +++ b/command/agent/check.go @@ -325,7 +325,7 @@ func (c *CheckHTTP) run() { c.check() next = time.After(c.Interval) case <-c.stopCh: - c.httpClient.Transport.(*http.Transport).CloseIdleConnections() + http.DefaultTransport.(*http.Transport).CloseIdleConnections() return } }