[spice-server,v2,7/7] red-channel-client: Reuse red_channel_client_shutdown

Submitted by Frediano Ziglio on Oct. 14, 2019, 9:22 a.m.

Details

Message ID 20191014092217.24405-8-fziglio@redhat.com
State New
Headers show
Series "Thread and Smartcard" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Oct. 14, 2019, 9:22 a.m.
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@redhat.com>
---
 server/red-channel-client.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patch hide | download patch | download mbox

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;