[libvirt] [PATCH 04/16] If in delay close mode for an RPC client, don't read further data
Daniel Veillard
veillard at redhat.com
Thu Jul 19 08:19:05 UTC 2012
On Wed, Jul 18, 2012 at 05:32:25PM +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> 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 at redhat.com>
> ---
> 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 at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list