[Spice-devel] [PATCH spice-gtk 3/5] webdav: don't start client on empty message

Jakub Janků jjanku at redhat.com
Mon Jun 17 20:46:28 UTC 2019


If the client on the remote side disconnects,
spice-webdav daemon sends a message with no data.

However, if the phodav server already closed
the client connection, client lookup fails and
we open a new connection to phodav, but don't write
anything to it - this should not happen,
so in such case, ignore the message and start
demuxing again.

Signed-off-by: Jakub Janků <jjanku at redhat.com>
---
 src/channel-webdav.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/channel-webdav.c b/src/channel-webdav.c
index 822fee0..ea287f1 100644
--- a/src/channel-webdav.c
+++ b/src/channel-webdav.c
@@ -421,8 +421,12 @@ static void data_read_cb(GObject *source_object,
 
     if (client)
         demux_to_client(client);
-    else
+    else if (size > 0)
         start_client(self);
+    else {
+        c->demuxing = FALSE;
+        start_demux(self);
+    }
 }
 
 
-- 
2.21.0



More information about the Spice-devel mailing list