Skip to content

Commit

Permalink
HDDS-11742. call getLeader once inside the getLeaderId method
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava Tutrinov committed Nov 28, 2024
1 parent 75fb348 commit 44f211d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ public GrpcTlsConfig getGrpcTlsConfig() {
@Override
@Nullable
public RaftPeerId getLeaderId() {
if (getLeader() != null) {
return getLeader().getId();
RaftPeer raftLeaderPeer = getLeader();
if (raftLeaderPeer != null) {
return raftLeaderPeer.getId();
}
return null;
}
Expand Down

0 comments on commit 44f211d

Please sign in to comment.