Skip to content

Commit 6386e20

Browse files
committed
Simplify init logic
1 parent e05b41a commit 6386e20

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft

src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/RaftCluster.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,11 @@ async ValueTask UnfreezeCoreAsync()
331331
public virtual async Task StartAsync(CancellationToken token = default)
332332
{
333333
await AuditTrail.InitializeAsync(token).ConfigureAwait(false);
334-
334+
InitializeState();
335+
}
336+
337+
private void InitializeState()
338+
{
335339
if (members.LocalMember is not { } member)
336340
{
337341
// Local member is not known. Start in frozen state and wait when the current node will be added to the cluster

0 commit comments

Comments
 (0)