From bc61aa1211666d5b0c2930a69b6b9db17288f003 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 7 Oct 2011 11:35:31 +0100 Subject: [PATCH] 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 --- src/rpc/virnetclientstream.c | 3 +++ 1 file changed, 3 insertions(+) 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: