mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-12 09:18:00 +03: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():
|
||||
for eid in self._domain_cb_ids:
|
||||
self._backend.domainEventDeregisterAny(eid)
|
||||
self._domain_cb_ids = []
|
||||
|
||||
for eid in self._network_cb_ids:
|
||||
self._backend.networkEventDeregisterAny(eid)
|
||||
self._network_cb_ids = []
|
||||
except:
|
||||
logging.debug("Failed to deregister events in conn cleanup",
|
||||
exc_info=True)
|
||||
finally:
|
||||
self._domain_cb_ids = []
|
||||
self._network_cb_ids = []
|
||||
|
||||
self._backend.close()
|
||||
self.record = []
|
||||
|
Loading…
Reference in New Issue
Block a user