Pārlūkot izejas kodu

Don't fake indexes for stopped repos

Jakob Borg 11 gadi atpakaļ
vecāks
revīzija
2b536de37f
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      cmd/syncthing/main.go

+ 6 - 0
cmd/syncthing/main.go

@@ -483,7 +483,13 @@ nextRepo:
 	// start needing a bunch of files which are nowhere to be found. This
 	// needs to be changed when we correctly do persistent indexes.
 	for _, repoCfg := range cfg.Repositories {
+		if repoCfg.Invalid != "" {
+			continue
+		}
 		for _, node := range repoCfg.NodeIDs() {
+			if node == myID {
+				continue
+			}
 			m.Index(node, repoCfg.ID, nil)
 		}
 	}