From 6ff8770e8fc05d89cf61b6fd9a2807797d406481 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Mon, 23 Oct 2023 13:57:57 +1000 Subject: [PATCH] refactor: Reset timer in batchBuilder --- pkg/processor/batch.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/processor/batch.go b/pkg/processor/batch.go index a5e6b608..8baed6e3 100644 --- a/pkg/processor/batch.go +++ b/pkg/processor/batch.go @@ -382,6 +382,8 @@ func (bvp *BatchItemProcessor[T]) batchBuilder(ctx context.Context) { bvp.batchReady <- true } + bvp.timer.Reset(bvp.o.BatchTimeout) + bvp.batchMutex.Unlock() } }