Skip to content

Commit

Permalink
Fix a bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
szetszwo committed Dec 27, 2024
1 parent 54dc115 commit 8d1f887
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ protected ReferenceCountedObject<AppendEntriesRequestProto> nextAppendEntriesReq
assertProtos(protos, followerNext, previous, snapshotIndex);
AppendEntriesRequestProto appendEntriesProto =
leaderState.newAppendEntriesRequestProto(follower, protos, previous, callId);
return ReferenceCountedObject.wrap(appendEntriesProto, entryList::retain, entryList::release);
final ReferenceCountedObject<AppendEntriesRequestProto> ref = ReferenceCountedObject.wrap(
appendEntriesProto, entryList::retain, entryList::release);
ref.retain();
entryList.release();
return ref;
}

private void assertProtos(List<LogEntryProto> protos, long nextIndex, TermIndex previous, long snapshotIndex) {
Expand Down

0 comments on commit 8d1f887

Please sign in to comment.