Fixed exception in flow requests

This commit is contained in:
Mark van Renswoude 2022-11-23 12:58:31 +01:00
parent b2ec59a3f3
commit 8675ab3d6e
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ namespace Tapeti.Flow.Default
internal async Task SendRequest(FlowContext context, object message, ResponseHandlerInfo responseHandlerInfo, internal async Task SendRequest(FlowContext context, object message, ResponseHandlerInfo responseHandlerInfo,
string? convergeMethodName = null, bool convergeMethodTaskSync = false, bool store = true) string? convergeMethodName = null, bool convergeMethodTaskSync = false, bool store = true)
{ {
if (context.FlowState == null) if (!context.HasFlowStateAndLock)
{ {
await CreateNewFlowState(context); await CreateNewFlowState(context);
Debug.Assert(context.FlowState != null, "context.FlowState != null"); Debug.Assert(context.FlowState != null, "context.FlowState != null");