Skip to content

Commit

Permalink
close response body on successful access token retrieval (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoli Kurtsevich authored Aug 22, 2023
1 parent 607a971 commit 3bf3814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (c *Client) GetAccessToken(creds *ClientCredentials) (*AccessToken, error)
if err != nil {
return nil, err
}

defer rsp.Body.Close()
token := &AccessToken{}
if err = token.Load(rsp.Body); err != nil {
return nil, err
Expand Down

0 comments on commit 3bf3814

Please sign in to comment.