mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 08:35:22 +00:00
Skip deleted timers when calculting next timeout
It is possible for there to be deleted timers when we
calculate the next timeout, and they must be skipped.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit afbd96678e
)
This commit is contained in:
parent
9d239b5956
commit
1f45a3233c
@ -332,6 +332,8 @@ static int virEventPollCalculateTimeout(int *timeout) {
|
||||
EVENT_DEBUG("Calculate expiry of %zu timers", eventLoop.timeoutsCount);
|
||||
/* Figure out if we need a timeout */
|
||||
for (i = 0 ; i < eventLoop.timeoutsCount ; i++) {
|
||||
if (eventLoop.timeouts[i].deleted)
|
||||
continue;
|
||||
if (eventLoop.timeouts[i].frequency < 0)
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user