[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH 1/1] vmmConsolePages: cleanup: close tunnels

Connect to a remote host with virt-manager (qemu+ssh://localhost/system
will suffice).  Open a vnc connection to a VM.  Close it, and re-open
it.  Re-open will hang.  Tested both on fedora 16 and ubuntu.

The ssh tunnels do not appear to be re-usable.  So close the tunnels
when the viewer is closed.

With this patch, re-opening vnc viewers works like a charm.

Signed-off-by: Serge Hallyn <serge hallyn canonical com>
 src/virtManager/console.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/virtManager/console.py b/src/virtManager/console.py
index 559bb31..f96718e 100644
--- a/src/virtManager/console.py
+++ b/src/virtManager/console.py
@@ -853,6 +853,9 @@ class vmmConsolePages(vmmGObjectUI):
         self.viewer_connected = False
+        if self.tunnels is not None:
+            self.tunnels.close_all()
+            self.tunnels = None
     def update_widget_states(self, vm, status_ignore):
         runable = vm.is_runable()

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]