After coroutine has exited, reset channel state to unconnected, this allows recycling a channel for reconnection, even in "normal" disconnect/reconnect cases. --- gtk/spice-channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index 100f272..e3c4299 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -2183,8 +2183,9 @@ static gboolean spice_channel_delayed_unref(gpointer data) g_return_val_if_fail(c->coroutine.coroutine.exited == TRUE, FALSE); + c->state = SPICE_CHANNEL_STATE_UNCONNECTED; + 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 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel