mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
connection: Avoid some useless errors when connection closes
- Run the connection - Restart libvirtd, connection is auto closed - Re-run the connection - Manually stop it, see errors in the logs about unknown event IDs We need to unconditionally clear our event ID list
This commit is contained in:
parent
1f7604b241
commit
873c22d19a
@ -973,14 +973,14 @@ class vmmConnection(vmmGObject):
|
|||||||
if not self._backend.is_closed():
|
if not self._backend.is_closed():
|
||||||
for eid in self._domain_cb_ids:
|
for eid in self._domain_cb_ids:
|
||||||
self._backend.domainEventDeregisterAny(eid)
|
self._backend.domainEventDeregisterAny(eid)
|
||||||
self._domain_cb_ids = []
|
|
||||||
|
|
||||||
for eid in self._network_cb_ids:
|
for eid in self._network_cb_ids:
|
||||||
self._backend.networkEventDeregisterAny(eid)
|
self._backend.networkEventDeregisterAny(eid)
|
||||||
self._network_cb_ids = []
|
|
||||||
except:
|
except:
|
||||||
logging.debug("Failed to deregister events in conn cleanup",
|
logging.debug("Failed to deregister events in conn cleanup",
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
|
finally:
|
||||||
|
self._domain_cb_ids = []
|
||||||
|
self._network_cb_ids = []
|
||||||
|
|
||||||
self._backend.close()
|
self._backend.close()
|
||||||
self.record = []
|
self.record = []
|
||||||
|
Loading…
Reference in New Issue
Block a user