Explorar o código

Don't fake indexes for stopped repos

Jakob Borg %!s(int64=11) %!d(string=hai) anos
pai
achega
2b536de37f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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)
 		}
 	}