Skip to content

Commit

Permalink
Wait for ActorSystem termination before returning from Dispose() of N…
Browse files Browse the repository at this point in the history
…eoSystem. (neo-project#607)
  • Loading branch information
jsolman authored and rodoufu committed Mar 3, 2019
1 parent 5d44340 commit 5e50e89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neo/NeoSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public void Dispose()
{
RpcServer?.Dispose();
EnsureStoped(LocalNode);
// Dispose will call ActorSystem.Terminate()
ActorSystem.Dispose();
ActorSystem.WhenTerminated.Wait();
}

public void EnsureStoped(IActorRef actor)
Expand Down

0 comments on commit 5e50e89

Please sign in to comment.