Skip to content

Commit

Permalink
introduced AK1001 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed Jan 10, 2024
1 parent 4cb76c7 commit ce834b6
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public ProductTotalsActor(string persistenceId)
var response = State.ProcessCommand(cmd);
var sentResponse = false;

var sender = Sender;

if (response.ResponseEvents.Any())
{
PersistAll(response.ResponseEvents, productEvent =>
Expand All @@ -66,7 +64,15 @@ public ProductTotalsActor(string persistenceId)
if (!sentResponse) // otherwise we'll generate a response-per-event
{
sentResponse = true;
sender.Tell(response);

async Task<ProductCommandResponse> ReplyToSender()
{
await Task.Delay(1);
return response;
}

ReplyToSender().PipeTo(Sender, failure: ex => new Status.Failure(ex));

}

if(LastSequenceNr % 10 == 0)
Expand Down

0 comments on commit ce834b6

Please sign in to comment.