]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
If in delay close mode for an RPC client, don't read further data
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 18 Jul 2012 15:48:24 +0000 (16:48 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 19 Jul 2012 09:18:26 +0000 (10:18 +0100)
In the delayed close mode, we're just waiting for final data to
be written back to the client. While waiting, we should not
bother to read more data from the client.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/rpc/virnetserverclient.c

index 30f0cc8518a2356f8e91c9f2a0d6c6a352ba4d53..d6b348b4b48566fb6927916773e21c20aaa7e9d3 100644 (file)
@@ -152,9 +152,10 @@ virNetServerClientCalculateHandleMode(virNetServerClientPtr client) {
                 mode |= VIR_EVENT_HANDLE_WRITABLE;
         }
     } else {
-        /* If there is a message on the rx queue then
+        /* If there is a message on the rx queue, and
+         * we're not in middle of a delayedClose, then
          * we're wanting more input */
-        if (client->rx)
+        if (client->rx && !client->delayedClose)
             mode |= VIR_EVENT_HANDLE_READABLE;
 
         /* If there are one or more messages to send back to client,