mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
Don't update timer if there's none.
Sometimes virObjectEventStateFlush can be called without timer (if the last event was unregistered right when the timer fired). There is a check for timer == -1, but that triggers warning and other log messages, which is unnecessary. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
cc38d5661f
commit
77d24de674
@ -818,7 +818,8 @@ virObjectEventStateFlush(virObjectEventStatePtr state)
|
||||
tempQueue.events = state->queue->events;
|
||||
state->queue->count = 0;
|
||||
state->queue->events = NULL;
|
||||
virEventUpdateTimeout(state->timer, -1);
|
||||
if (state->timer != -1)
|
||||
virEventUpdateTimeout(state->timer, -1);
|
||||
|
||||
virObjectEventStateQueueDispatch(state,
|
||||
&tempQueue,
|
||||
|
Loading…
x
Reference in New Issue
Block a user