Skip to content

Commit

Permalink
client: close response in IsQualityAvailable
Browse files Browse the repository at this point in the history
  • Loading branch information
samhza committed Jun 20, 2021
1 parent e2cb22f commit 142b824
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deezer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ func (c *Client) IsQualityAvailable(song Song, quality Quality) bool {
if err != nil {
return false
}
resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return false
}
Expand Down

0 comments on commit 142b824

Please sign in to comment.