First notify about disconnection before resetting the channel data. An audio recording task might expect the channel to be in a ready state otherwise, for example.
https://bugzilla.redhat.com/show_bug.cgi?id=810247 --- gtk/spice-channel.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index 783b94a..b0f2d4e 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -2411,11 +2411,11 @@ static void channel_disconnect(SpiceChannel *channel) c->has_error = TRUE; /* break the loop */ - spice_channel_reset(channel, FALSE); - if (c->state == SPICE_CHANNEL_STATE_READY) emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_CLOSED); + spice_channel_reset(channel, FALSE); + g_return_if_fail(SPICE_IS_CHANNEL(channel)); c->state = SPICE_CHANNEL_STATE_UNCONNECTED; } -- 1.7.7.6 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel