mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Avoid incrementing jobs_queued if virTimeMillisNow fails
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
6fcddfcd8f
commit
4365247677
@ -1222,13 +1222,12 @@ qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
|
||||
qemuDomainAsyncJobTypeToString(priv->job.asyncJob),
|
||||
obj, obj->def->name);
|
||||
|
||||
priv->jobs_queued++;
|
||||
|
||||
if (virTimeMillisNow(&now) < 0) {
|
||||
virObjectUnref(cfg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
priv->jobs_queued++;
|
||||
then = now + QEMU_JOB_WAIT_TIME;
|
||||
|
||||
virObjectRef(obj);
|
||||
|
Loading…
x
Reference in New Issue
Block a user