red_channel_client_shutdown remove the watch and shutdown the socket. Reuse in red_channel_client_disconnect. Calling shutdown will close the connection earlier. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/red-channel-client.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/red-channel-client.c b/server/red-channel-client.c index a4a57ce32..84864ea17 100644 --- a/server/red-channel-client.c +++ b/server/red-channel-client.c @@ -1744,10 +1744,7 @@ void red_channel_client_disconnect(RedChannelClient *rcc) return; } red_channel_client_pipe_clear(rcc); - if (rcc->priv->stream->watch) { - core->watch_remove(core, rcc->priv->stream->watch); - rcc->priv->stream->watch = NULL; - } + red_channel_client_shutdown(rcc); if (rcc->priv->latency_monitor.timer) { core->timer_remove(core, rcc->priv->latency_monitor.timer); rcc->priv->latency_monitor.timer = NULL; -- 2.21.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel