From faee1d5a8d611b202a49c76435967f5d30880a42 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 17 Nov 2016 08:50:24 +0000 Subject: [PATCH] lib/model: Fix locking around introduction handling (fixes #3737) GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3738 --- lib/model/model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model/model.go b/lib/model/model.go index 9927fec8b..4a71e3ea8 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 {