diff --git a/producer.go b/producer.go index 18695a4..96e0a08 100644 --- a/producer.go +++ b/producer.go @@ -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) @@ -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) -} \ No newline at end of file +}