Skip to content

Commit e7a1457

Browse files
authored
Merge pull request #1 from DerBlum/patch-1
Fix MaxWait only configuration
2 parents 450e3a5 + 7e509ac commit e7a1457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

producer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (p *BatchProducer) WatchProducer() {
8585
case <-time.After(p.MaxWait):
8686
p.Log.Infoln("MaxWait", "Items=", len(items))
8787
if len(items) == 0 {
88-
return
88+
continue
8989
}
9090

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

0 commit comments

Comments
 (0)