Merge pull request #19241 from rhvgoyal/fix-device-id-free
Mark device ID free only if device actually got deleted
This commit is contained in:
commit
d6e01e3337
1 changed files with 1 additions and 2 deletions
|
@ -1801,6 +1801,7 @@ func (devices *DeviceSet) deleteTransaction(info *devInfo, syncDelete bool) erro
|
|||
if info.Deleted {
|
||||
devices.nrDeletedDevices--
|
||||
}
|
||||
devices.markDeviceIDFree(info.DeviceID)
|
||||
} else {
|
||||
if err := devices.markForDeferredDeletion(info); err != nil {
|
||||
return err
|
||||
|
@ -1855,8 +1856,6 @@ func (devices *DeviceSet) deleteDevice(info *devInfo, syncDelete bool) error {
|
|||
return err
|
||||
}
|
||||
|
||||
devices.markDeviceIDFree(info.DeviceID)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue