Skip to content

Commit

Permalink
fix: remove close calls when body not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike committed Jun 4, 2024
1 parent 66b61b9 commit c757033
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/wsman/client/wsman.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ func (t *Target) Post(msg string) (response []byte, err error) {

res, err := t.Do(req)
if err != nil {
res.Body.Close()

return nil, err
}

Expand All @@ -157,8 +155,6 @@ func (t *Target) Post(msg string) (response []byte, err error) {

res, err = t.Do(req)
if err != nil && err.Error() != io.EOF.Error() {
res.Body.Close()

return nil, err
}
}
Expand Down

0 comments on commit c757033

Please sign in to comment.