Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed May 2, 2024
1 parent e794b97 commit e6b6514
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,14 @@ private async Task DoHeartbeats(TimeSpan period, IAuditTrail<IRaftLogEntry> audi
goto case MemberResponse.Canceled;
case MemberResponse.Canceled:
return;
case MemberResponse.Successful when ++quorum == majority:
RenewLease(startTime.Elapsed);
UpdateLeaderStickiness();
goto default;
default:
commitQuorum += Unsafe.BitCast<bool, byte>(result.Value);
continue;
}

if (++quorum == majority)
{
RenewLease(startTime.Elapsed);
UpdateLeaderStickiness();
}

commitQuorum += Unsafe.BitCast<bool, byte>(result.Value);
}
}

Expand Down

0 comments on commit e6b6514

Please sign in to comment.