Explorar el Código

lib/model: Trigger a puller iteration on connection (fixes #3451)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3453
Jakob Borg hace 9 años
padre
commit
7c7e8648ff
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      lib/model/model.go

+ 8 - 0
lib/model/model.go

@@ -726,6 +726,14 @@ func (m *Model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
 					l.Infof("Device %v folder %q has a new index ID (%v)", deviceID, folder.ID, dev.IndexID)
 					fs.Replace(deviceID, nil)
 					fs.SetIndexID(deviceID, dev.IndexID)
+				} else {
+					// They're sending a recognized index ID and will most
+					// likely use delta indexes. We might already have files
+					// that we need to pull so let the folder runner know
+					// that it should recheck the index data.
+					if runner := m.folderRunners[folder.ID]; runner != nil {
+						defer runner.IndexUpdated()
+					}
 				}
 			}
 		}