Skip to content

Commit

Permalink
Fix memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sober committed Mar 4, 2023
1 parent 5656876 commit 2b75ce4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions consumers.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (subs *consumers) buffer(in chan *Delivery, out chan Delivery) {
}

case out <- *queue[0]:
queue[0] = nil // Make the memory recycle normally
queue = queue[1:]
}
}
Expand Down

0 comments on commit 2b75ce4

Please sign in to comment.