diff --git a/Dockerfile b/Dockerfile index f72a989..cdba8d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.10.0 as builder +FROM golang:1.13.11 as builder RUN mkdir -p /go/src/github.com/cloudposse/prometheus-to-cloudwatch WORKDIR /go/src/github.com/cloudposse/prometheus-to-cloudwatch COPY . . diff --git a/prometheus_to_cloudwatch.go b/prometheus_to_cloudwatch.go index 6db0e25..2f4bdaf 100644 --- a/prometheus_to_cloudwatch.go +++ b/prometheus_to_cloudwatch.go @@ -514,6 +514,7 @@ func fetchMetricFamilies( } client := &http.Client{Transport: transport} decodeContent(client, url, ch) + client.CloseIdleConnections() } func decodeContent(client *http.Client, url string, ch chan<- *dto.MetricFamily) {