[libvirt] [PATCH 4/9] daemon: stream: Close stream on send failure

Michal Privoznik mprivozn at redhat.com
Mon May 2 08:48:03 UTC 2016


On 25.04.2016 20:46, Cole Robinson wrote:
> This is the only place in daemon/stream.c that sets
> 'stream->closed = true' but neglects to actually abort the stream
> and remove the callback, which seems wrong.
> ---
>  daemon/stream.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/daemon/stream.c b/daemon/stream.c
> index c892dcb..f072a17 100644
> --- a/daemon/stream.c
> +++ b/daemon/stream.c
> @@ -539,6 +539,9 @@ daemonStreamHandleWriteData(virNetServerClientPtr client,
>  
>          VIR_INFO("Stream send failed");
>          stream->closed = true;
> +        virStreamEventRemoveCallback(stream->st);
> +        virStreamAbort(stream->st);
> +
>          return virNetServerProgramSendReplyError(stream->prog,
>                                                   client,
>                                                   msg,
> 

Correct. Once we set stream->closed, pretty much no other callback are
called.

Michal




More information about the libvir-list mailing list