mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +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>
This commit is contained in:
parent
39064f0ff9
commit
afbd96678e
@ -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