Fix: precommit_batch method used the wrong cfg.PreCommitBatchWait

This commit is contained in:
zhoutian527 2021-07-02 15:53:21 +08:00 committed by Łukasz Magiera
parent 4fe3ecb8fc
commit c5ea17f838

View File

@ -86,7 +86,7 @@ func (b *PreCommitBatcher) run() {
panic(err)
}
timer := time.NewTimer(b.batchWait(cfg.CommitBatchWait, cfg.CommitBatchSlack))
timer := time.NewTimer(b.batchWait(cfg.PreCommitBatchWait, cfg.PreCommitBatchSlack))
for {
if forceRes != nil {
forceRes <- lastRes
@ -120,7 +120,7 @@ func (b *PreCommitBatcher) run() {
}
}
timer.Reset(b.batchWait(cfg.CommitBatchWait, cfg.CommitBatchSlack))
timer.Reset(b.batchWait(cfg.PreCommitBatchWait, cfg.PreCommitBatchSlack))
}
}