Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
virt-viewer
a62827d2-close-when-seeing-domain-stop-event.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File a62827d2-close-when-seeing-domain-stop-event.patch of Package virt-viewer
Subject: virt-viewer: ensure we close when seeing domain stop event From: Daniel P. Berrange berrange@redhat.com Tue Jul 12 11:27:09 2016 +0100 Date: Tue Jul 12 13:54:15 2016 +0100: Git: a62827d28c6b69e90102e4c1c8043cbddad8929a Normally virt-viewer relies on the VNC/SPICE widget seeing an EOF on its underlying connection to detect when the session is closed. When tunnelling to a remote guest over SSH though, this EOF can be delayed for a very long time, leaving a dead session open. This can be seen with virt-viewer -c qemu+ssh://remotehost/system guestname when on the remote shell run virsh destroy guestname and notice that virt-viewer does not see the shutdown immediately. When we get a domain stopped event we know the session should be dead, so forceably close it, if not already closed. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> diff --git a/src/virt-viewer.c b/src/virt-viewer.c index 173b0d3..3a3b64d 100644 --- a/src/virt-viewer.c +++ b/src/virt-viewer.c @@ -664,6 +664,7 @@ virt_viewer_domain_event(virConnectPtr conn G_GNUC_UNUSED, { VirtViewer *self = opaque; VirtViewerApp *app = VIRT_VIEWER_APP(self); + VirtViewerSession *session; GError *error = NULL; g_debug("Got domain event %d %d", event, detail); @@ -673,7 +674,9 @@ virt_viewer_domain_event(virConnectPtr conn G_GNUC_UNUSED, switch (event) { case VIR_DOMAIN_EVENT_STOPPED: - //virt_viewer_deactivate(self); + session = virt_viewer_app_get_session(app); + if (session != NULL) + virt_viewer_session_close(session); break; case VIR_DOMAIN_EVENT_STARTED:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor