Skip to content

Commit

Permalink
fix bug in checkhttp.go
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <[email protected]>
  • Loading branch information
dragonchaser committed Oct 15, 2024
1 parent e1fb51e commit dd59a36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocis-pkg/handlers/checkhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit dd59a36

Please sign in to comment.