Skip to content

Commit

Permalink
sharding PassivateIdle fix (#3808)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek001 authored and Aaronontheweb committed Jul 26, 2019
1 parent dfcd558 commit 285cf5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/contrib/cluster/Akka.Cluster.Sharding/DDataShard.cs
Expand Up @@ -114,6 +114,11 @@ internal sealed class DDataShard : ActorBase, IShard, IWithUnboundedStash
public void EntityTerminated(IActorRef tref) => this.BaseEntityTerminated(tref);
public void DeliverTo(string id, object message, object payload, IActorRef sender) => this.BaseDeliverTo(id, message, payload, sender);

protected override void PostStop()
{
PassivateIdleTask?.Cancel();
base.PostStop();
}

protected override bool Receive(object message) => WaitingForState(ImmutableHashSet<int>.Empty)(message);

Expand Down
6 changes: 6 additions & 0 deletions src/contrib/cluster/Akka.Cluster.Sharding/PersistentShard.cs
Expand Up @@ -84,6 +84,12 @@ internal sealed class PersistentShard : PersistentActor, IShard

public override string PersistenceId { get; }

protected override void PostStop()
{
PassivateIdleTask?.Cancel();
base.PostStop();
}

protected override bool ReceiveCommand(object message)
{
switch (message)
Expand Down

0 comments on commit 285cf5f

Please sign in to comment.