提交 afbd9667 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 39064f0f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册