diff --git a/flow/workflows/cdc_flow.go b/flow/workflows/cdc_flow.go index 4526cf2b4f..c10d6d1bb4 100644 --- a/flow/workflows/cdc_flow.go +++ b/flow/workflows/cdc_flow.go @@ -503,12 +503,12 @@ func CDCFlowWorkflow( _ = workflow.Sleep(ctx, 30*time.Second) } else { logger.Info("sync finished") + if state.SyncFlowOptions.NumberOfSyncs > 0 { + state.ActiveSignal = model.PauseSignal + } } syncFlowFuture = nil finished = true - if state.SyncFlowOptions.NumberOfSyncs > 0 { - state.ActiveSignal = model.PauseSignal - } }) flowSignalChan.AddToSelector(mainLoopSelector, func(val model.CDCFlowSignal, _ bool) {