contrib/raftexample: remove useless check

`err == raftsnap.ErrNoSnapshot` being false implies that
`err != raftsnap.ErrNoSnapshot` is true.
release-3.4
Jingguo Yao 2018-04-29 11:28:43 +08:00
parent 4bab1e1be2
commit cfa1efc7eb
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ func (s *kvstore) readCommits(commitC <-chan *string, errorC <-chan error) {
if err == raftsnap.ErrNoSnapshot {
return
}
if err != nil && err != raftsnap.ErrNoSnapshot {
if err != nil {
log.Panic(err)
}
log.Printf("loading snapshot at term %d and index %d", snapshot.Metadata.Term, snapshot.Metadata.Index)