fix bug in checkhttp.go

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2024-10-15 14:30:20 +02:00
parent e1fb51ea9d
commit dd59a36344

View File

@@ -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
}
}