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
This commit is contained in:
Daniel P. Berrange 2011-10-07 11:35:31 +01:00
parent 22af84dc52
commit bc61aa1211

View File

@ -268,6 +268,9 @@ int virNetClientStreamSetError(virNetClientStreamPtr st,
st->err.int1 = err.int1; st->err.int1 = err.int1;
st->err.int2 = err.int2; st->err.int2 = err.int2;
st->incomingEOF = true;
virNetClientStreamEventTimerUpdate(st);
ret = 0; ret = 0;
cleanup: cleanup: