From eed05ffba94efbc63f587add738e4649c1312ac4 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 17 Nov 2023 20:46:35 +0530 Subject: [PATCH] defers cancel --- flow/workflows/cdc_flow.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/workflows/cdc_flow.go b/flow/workflows/cdc_flow.go index 465969d113..1da320fe95 100644 --- a/flow/workflows/cdc_flow.go +++ b/flow/workflows/cdc_flow.go @@ -414,7 +414,7 @@ func CDCFlowWorkflowWithConfig( } // cancel the SendWalHeartbeat activity - cancelHeartbeat() + defer cancelHeartbeat() state.TruncateProgress() return nil, workflow.NewContinueAsNewError(ctx, CDCFlowWorkflowWithConfig, cfg, limits, state)