From: Daniel P. Berrange Date: Fri, 7 Oct 2011 10:35:31 +0000 (+0100) Subject: If receiving a stream error, mark EOF on the stream X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bc61aa1211666d5b0c2930a69b6b9db17288f003;p=libvirt.git If receiving a stream error, mark EOF on the stream If we receive an error on the stream, set the EOF marker so that any further (bogus) incoming data is dropped. * src/rpc/virnetclientstream.c: Set EOF on stream --- diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c index 4cd02952bf..7e2d9aeff0 100644 --- a/src/rpc/virnetclientstream.c +++ b/src/rpc/virnetclientstream.c @@ -268,6 +268,9 @@ int virNetClientStreamSetError(virNetClientStreamPtr st, st->err.int1 = err.int1; st->err.int2 = err.int2; + st->incomingEOF = true; + virNetClientStreamEventTimerUpdate(st); + ret = 0; cleanup: