mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
lib/model: Less locking in ClusterConfig (#5943)
This commit is contained in:
parent
720a6bf62e
commit
86e35f1879
@ -1062,8 +1062,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
}
|
||||
}
|
||||
|
||||
m.fmut.Lock()
|
||||
defer m.fmut.Unlock()
|
||||
m.fmut.RLock()
|
||||
var paused []string
|
||||
for _, folder := range cm.Folders {
|
||||
cfg, ok := m.cfg.Folder(folder.ID)
|
||||
@ -1184,6 +1183,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
// implementing suture.IsCompletable).
|
||||
m.Add(is)
|
||||
}
|
||||
m.fmut.RUnlock()
|
||||
|
||||
m.pmut.Lock()
|
||||
m.remotePausedFolders[deviceID] = paused
|
||||
|
Loading…
x
Reference in New Issue
Block a user