my friends advised me to add this if
This commit is contained in:
parent
4689ab82c7
commit
4e6277aed7
@ -289,7 +289,7 @@ impl Resources {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn free_vm_resources(&mut self, vm: &VM) {
|
fn free_vm_resources(&mut self, vm: &VM) {
|
||||||
if self.existing_vms.remove(&vm.uuid) {
|
if !self.existing_vms.remove(&vm.uuid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.reserved_vcpus = self.reserved_vcpus.saturating_sub(vm.vcpus);
|
self.reserved_vcpus = self.reserved_vcpus.saturating_sub(vm.vcpus);
|
||||||
|
Loading…
Reference in New Issue
Block a user