diff --git a/core/executors/periodicalexecutor.go b/core/executors/periodicalexecutor.go index 98bb7cb5..aaf2a6d8 100644 --- a/core/executors/periodicalexecutor.go +++ b/core/executors/periodicalexecutor.go @@ -82,6 +82,7 @@ func (pe *PeriodicalExecutor) Sync(fn func()) { } func (pe *PeriodicalExecutor) Wait() { + pe.Flush() pe.wgBarrier.Guard(func() { pe.waitGroup.Wait() })