From 3fd0ed34c4e124c8cc3c7f19249b6dff6c16ecd6 Mon Sep 17 00:00:00 2001 From: Geoffrey Grosenbach Date: Fri, 17 Aug 2018 15:26:49 -0700 Subject: [PATCH] Close HTTP request to avoid memory leaks or too many open FDs --- services/dashboard-service/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/services/dashboard-service/main.go b/services/dashboard-service/main.go index bc4b7b5..a3d5530 100644 --- a/services/dashboard-service/main.go +++ b/services/dashboard-service/main.go @@ -108,6 +108,7 @@ func getAndParseCount() (Count, error) { return Count{}, readErr } + defer res.Body.Close() return parseCount(body) }