소스 검색

Restrict next_index to be non-zero.

Otherwise we start with a install snapshot request at the beginning of
the term.
Jing Yang 3 년 전
부모
커밋
aac1aed60b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/sync_log_entries.rs

+ 1 - 0
src/sync_log_entries.rs

@@ -45,6 +45,7 @@ impl SyncLogEntriesComms {
     }
 
     pub fn reset_progress(&self, term: Term, index: Index) {
+        let index = std::cmp::max(index, 1);
         let _ = self.tx.send(Event::NewTerm(term, index));
     }