Whenever we reach these branches, we will abort or have to create a new spice session (from the dialog showed to the user). So, destroying the channel on these situations seems sane enough. It also avoids an error dialog to be popped out twice with (basically) the same information. --- Changes since v1: - Use virt_viewer_session_spice_channel_destroy() for _ERROR_{IO,LINK,TLS} as well --- src/virt-viewer-session-spice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c index 851d2f6..6c9f72c 100644 --- a/src/virt-viewer-session-spice.c +++ b/src/virt-viewer-session-spice.c @@ -610,14 +610,14 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel, spice_session_connect(self->priv->session); } } else { - g_signal_emit_by_name(session, "session-disconnected", error ? error->message : NULL); + virt_viewer_session_spice_channel_destroy(NULL, channel, session); } } break; case SPICE_CHANNEL_ERROR_IO: case SPICE_CHANNEL_ERROR_LINK: case SPICE_CHANNEL_ERROR_TLS: - g_signal_emit_by_name(session, "session-disconnected", NULL); + virt_viewer_session_spice_channel_destroy(NULL, channel, session); break; default: g_warning("unhandled spice main channel event: %d", event); -- 2.3.5 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list