From dd59a36344b9e6d122adddbee77428fcf6930916 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Tue, 15 Oct 2024 14:30:20 +0200 Subject: [PATCH] fix bug in checkhttp.go Signed-off-by: Christian Richter --- ocis-pkg/handlers/checkhttp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocis-pkg/handlers/checkhttp.go b/ocis-pkg/handlers/checkhttp.go index a23e5076ffb..a2af7c14cf7 100644 --- a/ocis-pkg/handlers/checkhttp.go +++ b/ocis-pkg/handlers/checkhttp.go @@ -13,10 +13,11 @@ func NewHTTPCheck(url string) func(context.Context) error { c := http.Client{ Timeout: 3 * time.Second, } - _, err := c.Get(url) + resp, err := c.Get(url) if err != nil { return fmt.Errorf("could not connect to http server: %v", err) } + _ = resp.Body.Close() return nil } }