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

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

 



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,
-- 
2.7.3

--
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]