Skip to content

Commit

Permalink
Merge pull request #172 from testwill/close_body
Browse files Browse the repository at this point in the history
fix: close resp body
  • Loading branch information
ZinoKader authored May 29, 2024
2 parents 3a5c402 + e3d979b commit e51984e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/semver/semver.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func GetRendezvousVersion(ctx context.Context, addr string) (Version, error) {
if err != nil {
return Version{}, fmt.Errorf("fetching the latest version from relay: %w", err)
}
defer r.Body.Close()
var version Version
if err := json.NewDecoder(r.Body).Decode(&version); err != nil {
return Version{}, fmt.Errorf("decoding version response from relay: %w", err)
Expand Down

0 comments on commit e51984e

Please sign in to comment.