mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
lib/model: Handle concurrently removed device in ClusterConfig (#6666)
This commit is contained in:
parent
8343db6766
commit
cf75329067
@ -956,7 +956,11 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
changed := false
|
changed := false
|
||||||
deviceCfg := m.cfg.Devices()[deviceID]
|
deviceCfg, ok := m.cfg.Devices()[deviceID]
|
||||||
|
if !ok {
|
||||||
|
l.Debugln("Device disappeared from config while processing cluster-config")
|
||||||
|
return errDeviceUnknown
|
||||||
|
}
|
||||||
|
|
||||||
// Needs to happen outside of the fmut, as can cause CommitConfiguration
|
// Needs to happen outside of the fmut, as can cause CommitConfiguration
|
||||||
if deviceCfg.AutoAcceptFolders {
|
if deviceCfg.AutoAcceptFolders {
|
||||||
|
Loading…
Reference in New Issue
Block a user