Explorar el Código

Merge pull request #9657 from yaojingguo/remove-dead-code

contrib/raftexample: remove useless check
Xiang Li hace 7 años
padre
commit
02ed51d300
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      contrib/raftexample/kvstore.go

+ 1 - 1
contrib/raftexample/kvstore.go

@@ -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)