lib/model: Handle concurrently removed device in ClusterConfig (#6666)
This commit is contained in:
+5
-1
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user