diff --git a/lib/model/model.go b/lib/model/model.go index 9927fec8..4a71e3ea 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -857,7 +857,6 @@ func (m *Model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon go sendIndexes(conn, folder.ID, fs, m.folderIgnores[folder.ID], startSequence, dbLocation) } - m.fmut.Unlock() // This breaks if we send multiple CM messages during the same connection. if len(tempIndexFolders) > 0 { @@ -883,6 +882,7 @@ func (m *Model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon changed = true } } + m.fmut.Unlock() if changed { if err := m.cfg.Save(); err != nil {