Skip to content

Commit

Permalink
confirm TakeOverFromMe when singleton already in oldest state (#3553)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek001 authored and Aaronontheweb committed Jul 25, 2018
1 parent f406bfd commit a19051a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,12 @@ private void InitializeFSM()
{
return GoToHandingOver(oldest.Singleton, oldest.SingletonTerminated, Sender);
}
else if (e.FsmEvent is TakeOverFromMe)
{
// already oldest, so confirm and continue like that
Sender.Tell(HandOverToMe.Instance);
return Stay();
}
else if (e.FsmEvent is Terminated terminated && e.StateData is OldestData o && terminated.ActorRef.Equals(o.Singleton))
{
return Stay().Using(new OldestData(o.Singleton, true));
Expand Down

0 comments on commit a19051a

Please sign in to comment.