mirror of
https://github.com/syncthing/syncthing.git
synced 2026-10-27 13:38:30 -04:00
Towards the end of the function f.folderCfgs and f.folderRunners are read without the lock.
This commit is contained in:
1 parent
13d9317a38
commit
958ff67ccc
1 file changed
+3
@@ -1346,6 +1346,9 @@ func (m *model) ensureIndexHandler(conn protocol.Connection) *indexHandlerRegist
|
||||
deviceID := conn.DeviceID()
|
||||
connID := conn.ConnectionID()
|
||||
|
||||
// We must acquire fmut first when acquiring both locks.
|
||||
m.fmut.RLock()
|
||||
defer m.fmut.RUnlock()
|
||||
m.pmut.Lock()
|
||||
defer m.pmut.Unlock()
|
||||
|
||||
|
||||
Reference in new issue
Block a user