From 306889c958ac6aaf3f8688f622a5e804d73fe14b Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Thu, 3 Oct 2019 16:52:55 +0200 Subject: [PATCH] Add TODO on closing the connection of the http.Client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Héctor Hurtado --- internal/http/request.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/http/request.go b/internal/http/request.go index 1b6fcc0..4acf662 100644 --- a/internal/http/request.go +++ b/internal/http/request.go @@ -59,5 +59,7 @@ func Request(method string, url string, r io.Reader, w io.Writer) error { } else { _, err = io.Copy(w, res.Body) } + + // TODO: close the connection, otherwise we'll have a port leak in the server return err }