diff mbox

[6/9] daemon: stream: set stream->closed on removal

Message ID 03d75b2dfe788a436774f161de15678e506eca4f.1461609759.git.crobinso@redhat.com
State Accepted
Commit 75e19990425fcc996a979c676fee899ae2e6e4c9
Headers show

Commit Message

Cole Robinson April 25, 2016, 6:46 p.m. UTC
These are the only places where we don't set stream->closed when
aborting the stream. This leads to spurious errors when the client
hangs up unexpectedly:

error : virFDStreamUpdateCallback:127 : internal error: stream is not open
---
 daemon/stream.c | 2 ++
 1 file changed, 2 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 8a97260..fcec3d0 100644
--- a/daemon/stream.c
+++ b/daemon/stream.c
@@ -463,6 +463,7 @@  daemonRemoveClientStream(virNetServerClientPtr client,
     }
 
     if (!stream->closed) {
+        stream->closed = true;
         virStreamEventRemoveCallback(stream->st);
         virStreamAbort(stream->st);
     }
@@ -493,6 +494,7 @@  daemonRemoveAllClientStreams(daemonClientStream *stream)
         tmp = stream->next;
 
         if (!stream->closed) {
+            stream->closed = true;
             virStreamEventRemoveCallback(stream->st);
             virStreamAbort(stream->st);
         }