mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-08 04:05:51 +00:00
virt-viewer: Ensure to not close during migration
Take a look at the shutdown event detail before killing
the connection. Otherwise it breaks the SPICE seamless migration
feature.
Regression since commit a62827d28c
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442929
Signed-off-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
701d57742f
commit
209c80375b
@ -52,6 +52,10 @@
|
||||
#include "virt-viewer-auth.h"
|
||||
#include "virt-viewer-util.h"
|
||||
|
||||
#ifdef HAVE_SPICE_GTK
|
||||
#include "virt-viewer-session-spice.h"
|
||||
#endif
|
||||
|
||||
struct _VirtViewerPrivate {
|
||||
char *uri;
|
||||
virConnectPtr conn;
|
||||
@ -737,6 +741,13 @@ virt_viewer_domain_event(virConnectPtr conn G_GNUC_UNUSED,
|
||||
switch (event) {
|
||||
case VIR_DOMAIN_EVENT_STOPPED:
|
||||
session = virt_viewer_app_get_session(app);
|
||||
#ifdef HAVE_SPICE_GTK
|
||||
/* do not disconnect due to migration */
|
||||
if (detail == VIR_DOMAIN_EVENT_STOPPED_MIGRATED &&
|
||||
VIRT_VIEWER_IS_SESSION_SPICE(session)) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (session != NULL)
|
||||
virt_viewer_session_close(session);
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user