diff mbox

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

Message ID 32ddfc4d6707baa3c0098802aa3fdd23a7f9e37c.1461609759.git.crobinso@redhat.com
State Accepted
Commit e7407872a4ddf52c0ee379181400b82cbfde6908
Headers show

Commit Message

Cole Robinson April 25, 2016, 6:46 p.m. UTC
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(+)

-- 
2.7.3

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

Patch

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,