Skip to content

Commit 262932c

Browse files
committed
Wait to finish batch consuming process
1 parent 335e3d3 commit 262932c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

process.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ func (p *processImpl) startBatchConsumingProcess(ctx context.Context) error {
6464

6565
defer close(inCh)
6666

67+
p.wg.Add(1)
6768
go func() {
69+
defer p.wg.Done()
6870
batchConsumer := chainBatchConsumerInterceptors(p.BatchConsumer, p.BatchConsumerInterceptors...)
6971

7072
p.Logger.Print("Start batch consuming process")

0 commit comments

Comments
 (0)