Switching for migration reason is similar to a reconnection during initial connection. A notable difference is that new code path doesn't schedule a delayed_unref callback. This is fine since the channel is still running and delayed_unref is mainly used for signaling disconnections and none should be emitted when switching. --- gtk/spice-channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index e3c4299..f036105 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -2437,7 +2437,8 @@ cleanup: SPICE_CHANNEL_GET_CLASS(channel)->channel_disconnect(channel); - if (c->state == SPICE_CHANNEL_STATE_RECONNECTING) { + if (c->state == SPICE_CHANNEL_STATE_RECONNECTING || + c->state == SPICE_CHANNEL_STATE_SWITCHING) { g_warn_if_fail(c->event == SPICE_CHANNEL_NONE); channel_connect(channel, c->tls); g_object_unref(channel); @@ -2655,7 +2656,6 @@ static void channel_disconnect(SpiceChannel *channel) g_return_if_fail(SPICE_IS_CHANNEL(channel)); if (c->state == SPICE_CHANNEL_STATE_SWITCHING) { - channel_connect(channel, c->tls); spice_session_set_migration_state(spice_channel_get_session(channel), SPICE_SESSION_MIGRATION_NONE); } -- 2.1.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel