diff --git a/flow/workflows/sync_flow.go b/flow/workflows/sync_flow.go index 7a1fc11571..567d772746 100644 --- a/flow/workflows/sync_flow.go +++ b/flow/workflows/sync_flow.go @@ -194,7 +194,7 @@ func SyncFlowWorkflow( } }) - for ctx.Err() == nil && !syncDone && !selector.HasPending() { + for ctx.Err() == nil && !syncDone && selector.HasPending() { selector.Select(ctx) } if ctx.Err() != nil { @@ -206,7 +206,7 @@ func SyncFlowWorkflow( waitChan.Receive(ctx) if restart { // must flush selector for signals received while waiting - for ctx.Err() == nil && !selector.HasPending() { + for ctx.Err() == nil && selector.HasPending() { selector.Select(ctx) } break