diff --git a/command/agent/check.go b/command/agent/check.go index 352c986fe3..ef0eea3ad1 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: + http.DefaultTransport.(*http.Transport).CloseIdleConnections() return } }