Re: [PATCH 04/16] If in delay close mode for an RPC client, don't read further data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 18, 2012 at 05:32:25PM +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  src/rpc/virnetserverclient.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
> index 30f0cc8..d6b348b 100644
> --- a/src/rpc/virnetserverclient.c
> +++ b/src/rpc/virnetserverclient.c
> @@ -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,

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]