Commit f49fbe28 authored by Anael Beutot's avatar Anael Beutot
Browse files

Set libvirt event loop watchers to max priority.

This is a fix when is the same poll we try to update a tag value for a VM and
the domain just has been removed.
parent 5b4552dc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ class LoopHandler(object):
        self._events = self.virt_to_ev(events)
        self._cb = cb
        self.opaque = opaque
        self.watcher = loop.io(self.fd, self._events, self.ev_cb)
        self.watcher = loop.io(self.fd, self._events, self.ev_cb,
                               None, pyev.EV_MAXPRI)

    def ev_to_virt(self, events):
        """Convert libev events into libvirt one."""
@@ -129,7 +130,7 @@ class LoopTimer(object):
        self.stop()
        if self._interval >= 0.:  # libvirt sends us interval == -1
            self.watcher = self.loop.timer(self._interval, self._interval,
                                           self.ev_cb)
                                           self.ev_cb, None, pyev.EV_MAXPRI)
        else:
            self.watcher = None
        self.start()