Skip to content

Commit

Permalink
Merge pull request #1 from DerBlum/patch-1
Browse files Browse the repository at this point in the history
Fix MaxWait only configuration
  • Loading branch information
Deeptiman authored Jan 25, 2022
2 parents 450e3a5 + 7e509ac commit e7a1457
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (p *BatchProducer) WatchProducer() {
case <-time.After(p.MaxWait):
p.Log.Infoln("MaxWait", "Items=", len(items))
if len(items) == 0 {
return
continue
}

items = p.releaseBatch(items)
Expand Down Expand Up @@ -132,4 +132,4 @@ func (p *BatchProducer) createBatchNo() {
// getBatchNo will get the current BatchNo from the atomic variable.
func (p *BatchProducer) getBatchNo() int32 {
return atomic.LoadInt32(&p.BatchNo)
}
}

0 comments on commit e7a1457

Please sign in to comment.