[Spice-devel] [PATCHv2 03/10] channel: reset connection state on error
Marc-André Lureau
marcandre.lureau at redhat.com
Tue Jan 27 05:53:16 PST 2015
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 90ba631..2ad4800 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -2180,6 +2180,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
More information about the Spice-devel
mailing list