From fe703839b9e3cf978b8abd375f2f0e04baa7ac6a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 23 Mar 2011 10:07:23 -0400 Subject: [PATCH] connection: Clear all cached objects when connection closes For example, we didn't clear the iface list. So if a libvirtd was restarted, the active connection is closed, but the old ifaces which reference the closed connection hang around. Trying to launch the addhw dialog for example doesn't work after reopening a new connection. --- src/virtManager/connection.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py index 354ab4f4..7bc66680 100644 --- a/src/virtManager/connection.py +++ b/src/virtManager/connection.py @@ -833,11 +833,16 @@ class vmmConnection(vmmGObject): return self.vmm = None - self.nets = {} + self.nodedevs = {} + self.netdevs = {} + self.mediadevs = {} + self.interfaces = {} self.pools = {} + self.nets = {} self.vms = {} self.activeUUIDs = [] self.record = [] + self._change_state(self.STATE_DISCONNECTED) def _open_dev_conn(self, uri):