Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: update default consumer.
Signed-off-by: Bo-Yi.Wu <[email protected]>
  • Loading branch information
appleboy committed Jan 22, 2023
commit dda7b8acc8a4ce774812a11ea71b75a41da3b69c
2 changes: 1 addition & 1 deletion consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (s *Consumer) Queue(task core.QueuedMessage) error { //nolint:stylecheck
if atomic.LoadInt32(&s.stopFlag) == 1 {
return ErrQueueShutdown
}
if s.count >= s.capacity {
if s.capacity > 0 && s.count >= s.capacity {
return errMaxCapacity
}

Expand Down