diff --git a/lib/Ravada/Domain/KVM.pm b/lib/Ravada/Domain/KVM.pm index a9a14dd49..20e3a8fae 100644 --- a/lib/Ravada/Domain/KVM.pm +++ b/lib/Ravada/Domain/KVM.pm @@ -238,11 +238,12 @@ sub _vol_remove { if $@ !~ /libvirt error code: 50,/i; next; } - for ( ;; ) { + for ( 1 .. 3 ) { eval { $vol->delete() }; last if !$@; sleep 1; } + die $@ if $@; eval { $pool->refresh }; warn $@ if $@; }