]> xenbits.xensource.com Git - libvirt.git/commitdiff
daemon: stream: Close stream on send failure
authorCole Robinson <crobinso@redhat.com>
Mon, 25 Apr 2016 17:15:48 +0000 (13:15 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 2 May 2016 14:13:04 +0000 (10:13 -0400)
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

index c892dcbe960946f951ed1237c78184a2ec4ecea1..f072a17842a8b00477f6b7beb8cc553640281734 100644 (file)
@@ -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,