[Spice-devel] [RFC v4 08/62] server/red_channel: workaround for fast client disconnect bug (TODO - real fix)

Alon Levy alevy at redhat.com
Tue Apr 26 03:54:33 PDT 2011


---
 server/red_channel.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/server/red_channel.c b/server/red_channel.c
index 2b76f31..b124980 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -579,6 +579,11 @@ void red_channel_client_push(RedChannelClient *rcc)
         red_channel_client_send(rcc);
     }
 
+    if (rcc->send_data.item && !rcc->send_data.blocked) {
+        rcc->send_data.blocked = TRUE;
+        red_printf("ERROR: an item waiting to be sent and not blocked");
+    }
+
     while ((pipe_item = red_channel_client_pipe_item_get(rcc))) {
         red_channel_client_send_item(rcc, pipe_item);
     }
-- 
1.7.4.4



More information about the Spice-devel mailing list