From 61f70b689044ea53f4103e79a128af640c003f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 13 Jan 2015 16:33:52 +0100 Subject: [PATCH spice-gtk 3/3] channel: reset connection state on error Fix regression introduced in 6b475802, to permit reconnection on error, the channel state must be < STATE_CONNECTING. Since the error is reported after coroutine exits and channel is reset, the state can be modified before throwing the error now. --- gtk/spice-channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index 99065d3..eec63b1 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -2184,6 +2184,7 @@ static gboolean spice_channel_delayed_unref(gpointer data) g_return_val_if_fail(c->coroutine.coroutine.exited == TRUE, FALSE); if (c->event != SPICE_CHANNEL_NONE) { + c->state = SPICE_CHANNEL_STATE_UNCONNECTED; g_coroutine_signal_emit(channel, signals[SPICE_CHANNEL_EVENT], 0, c->event); c->event = SPICE_CHANNEL_NONE; g_clear_error(&c->error); -- 2.1.0