Reset replyReceivedForOffset correctly
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / behaviors / LeaderInstallSnapshotState.java
index 758345214841ba62ab41af0827427a505562198f..b362530d575964d3d3b5144e490518062970200f 100644 (file)
@@ -174,10 +174,11 @@ public final class LeaderInstallSnapshotState implements AutoCloseable {
 
         offset = 0;
         replyStatus = false;
-        replyReceivedForOffset = offset;
+        replyReceivedForOffset = INITIAL_LAST_CHUNK_HASH_CODE;
         chunkIndex = FIRST_CHUNK_INDEX;
         currentChunk = null;
         lastChunkHashCode = INITIAL_LAST_CHUNK_HASH_CODE;
+        nextChunkHashCode = INITIAL_LAST_CHUNK_HASH_CODE;
 
         try {
             snapshotInputStream = snapshotBytes.openStream();