
On 11/22/2012 05:48 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
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> --- src/util/event_poll.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/util/event_poll.c b/src/util/event_poll.c index 2ffa94b..53b9c6c 100644 --- a/src/util/event_poll.c +++ b/src/util/event_poll.c @@ -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;
ACK, Martin