Skip to content

Commit 97229c2

Browse files
author
avijenkins
committed
Updated assets for go models and clients
Signed-off-by: avijenkins <svc.avi-jenkins@broadcom.com>
1 parent 6fa0ed6 commit 97229c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/session/avisession.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,9 @@ func (avisess *AviSession) extractErrorMessage(resp *http.Response) *string {
17621762
glog.Errorf("Error reading response body: %v", err)
17631763
return nil
17641764
}
1765+
resp.Body.Close()
1766+
// After reading, we need to restore the body so it can be read again.
1767+
resp.Body = io.NopCloser(bytes.NewBuffer(bodyBytes))
17651768

17661769
if len(bodyBytes) == 0 {
17671770
return nil

0 commit comments

Comments
 (0)