Browse Source

lib/model: Fix locking around introduction handling (fixes #3737)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3738
Jakob Borg 9 years ago
parent
commit
faee1d5a8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/model/model.go

+ 1 - 1
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 {