[Spice-devel] [PATCH spice-server v2 7/7] red-channel-client: Reuse red_channel_client_shutdown

Frediano Ziglio fziglio at redhat.com
Mon Oct 14 09:22:17 UTC 2019


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 at redhat.com>
---
 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



More information about the Spice-devel mailing list