Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishkf committed Jan 27, 2023
1 parent 6656660 commit 006d9b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ func (batch *Batch) close() (err error) {
batch.lock = nil
if batch.msgs != nil {
batch.msgs.discard()
}

if batch.msgs.decompressed != nil {
releaseBuffer(batch.msgs.decompressed)
batch.msgs.decompressed = nil
}

if err = batch.err; errors.Is(batch.err, io.EOF) {
Expand Down

0 comments on commit 006d9b5

Please sign in to comment.