Skip to content

Commit

Permalink
Make sure we read full body before close
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Oct 16, 2022
1 parent 5a3682b commit 453dd1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions logdrainer/logdrainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (l *logDrainerStorer) StoreResources(messages []logging.Resource, count int
_, _ = fmt.Fprintf(os.Stderr, "failed to send log: %v %v", resp, err)
}
if resp != nil {
_, _ = io.Copy(io.Discard, resp.Body)
_ = resp.Body.Close()
}
}
Expand Down

0 comments on commit 453dd1e

Please sign in to comment.