Skip to content

Commit

Permalink
Removed return of force exit task in coordinated shutdown, which caus…
Browse files Browse the repository at this point in the history
…ed timeout akkadotnet#3815
  • Loading branch information
mwprac committed Jun 4, 2019
1 parent 00b73df commit 78fd223
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/Akka/Actor/CoordinatedShutdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -626,13 +626,12 @@ internal static void InitPhaseActorSystemTerminate(ActorSystem system, Config co
// We must spawn a separate Task to not block current thread,
// since that would have blocked the shutdown of the ActorSystem.
var timeout = coord.Timeout(PhaseActorSystemTerminate);
return Task.Run(() =>
Task.Run(() =>
{
if (!system.WhenTerminated.Wait(timeout) && !coord._runningClrHook)
{
Environment.Exit(0);
}
return Done.Instance;
});
}

Expand Down

0 comments on commit 78fd223

Please sign in to comment.