Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeralsing committed Feb 29, 2024
1 parent b93fa8d commit bda950c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Proto.Cluster/Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ public async Task ShutdownAsync(bool graceful = true, string reason = "")
MemberList.Stopping = true;
await Gossip.SetStateAsync(GossipKeys.GracefullyLeft, new Empty()).ConfigureAwait(false);

// Logger.LogInformation("Waiting for two gossip intervals to pass for {Id}", System.Id);
// // In case provider shutdown is quick, let's wait at least 2 gossip intervals.
// await Task.Delay((int)Config.GossipInterval.TotalMilliseconds * 2).ConfigureAwait(false);
//
Logger.LogInformation("Waiting for two gossip intervals to pass for {Id}", System.Id);
// In case provider shutdown is quick, let's wait at least 2 gossip intervals.
await Task.Delay((int)Config.GossipInterval.TotalMilliseconds * 2).ConfigureAwait(false);

// Logger.LogInformation("Stopping cluster provider for {Id}", System.Id);
// // Deregister from configured cluster provider.
// await Provider.ShutdownAsync(graceful);
Expand All @@ -313,18 +313,18 @@ public async Task ShutdownAsync(bool graceful = true, string reason = "")
// }
//
// // Cancel the primary CancellationToken first which will shut down a number of concurrent systems simultaneously.
// await System.ShutdownAsync(reason).ConfigureAwait(false);
await System.ShutdownAsync(reason).ConfigureAwait(false);
//
// Shut down the rest of the dependencies in reverse order that they were started.
await Gossip.ShutdownAsync().ConfigureAwait(false);

if (graceful)
{
await IdentityLookup.ShutdownAsync().ConfigureAwait(false);
}

await Remote.ShutdownAsync(graceful).ConfigureAwait(false);

// await Gossip.ShutdownAsync().ConfigureAwait(false);
//
// if (graceful)
// {
// await IdentityLookup.ShutdownAsync().ConfigureAwait(false);
// }
//
// await Remote.ShutdownAsync(graceful).ConfigureAwait(false);
//
_shutdownCompletedTcs.TrySetResult(true);
Logger.LogInformation("Stopped Cluster {Id}", System.Id);
}
Expand Down

0 comments on commit bda950c

Please sign in to comment.