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

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3453
This commit is contained in:
Jakob Borg 2016-07-27 21:35:41 +00:00 committed by Audrius Butkevicius
parent 24e2ce0764
commit 7c7e8648ff
1 changed files with 8 additions and 0 deletions

View File

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