From 7c7e8648ffcd49222f5c3c358a820506b0c7a786 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 27 Jul 2016 21:35:41 +0000 Subject: [PATCH] lib/model: Trigger a puller iteration on connection (fixes #3451) GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3453 --- lib/model/model.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/model/model.go b/lib/model/model.go index 3d1151ed3..bc23fda3b 100644 --- a/lib/model/model.go +++ b/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() + } } } }