From: Cole Robinson Date: Mon, 25 Apr 2016 17:18:26 +0000 (-0400) Subject: daemon: stream: don't update events if stream->closed X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a680dde6432f43fc4a21f8b29c402746efc4c08d;p=libvirt.git daemon: stream: don't update events if stream->closed Calling virStreamFinish prematurely seems to trigger this code path even after the stream is closed, which ends up hitting this error message later: error : virFDStreamUpdateCallback:127 : internal error: stream is not open Skip this function if stream->closed, which is used in many other places like read/write handlers --- diff --git a/daemon/stream.c b/daemon/stream.c index f072a17842..8a9726059f 100644 --- a/daemon/stream.c +++ b/daemon/stream.c @@ -76,6 +76,8 @@ static void daemonStreamUpdateEvents(daemonClientStream *stream) { int newEvents = 0; + if (stream->closed) + return; if (stream->rx) newEvents |= VIR_STREAM_EVENT_WRITABLE; if (stream->tx && !stream->recvEOF)