Skip to content

Commit

Permalink
Merge pull request #159 from johanneswuerbach/fix-close-race
Browse files Browse the repository at this point in the history
fix: consumer close before run
  • Loading branch information
wagslane authored Jun 21, 2024
2 parents eebea88 + e564b43 commit 249fe54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ func (consumer *Consumer) startGoroutines(
handler Handler,
options ConsumerOptions,
) error {
consumer.isClosedMux.Lock()
defer consumer.isClosedMux.Unlock()
err := consumer.chanManager.QosSafe(
options.QOSPrefetch,
0,
Expand Down

0 comments on commit 249fe54

Please sign in to comment.