提交 75e19990 编写于 作者: C Cole Robinson

daemon: stream: set stream->closed on removal

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
上级 a680dde6
...@@ -463,6 +463,7 @@ daemonRemoveClientStream(virNetServerClientPtr client, ...@@ -463,6 +463,7 @@ daemonRemoveClientStream(virNetServerClientPtr client,
} }
if (!stream->closed) { if (!stream->closed) {
stream->closed = true;
virStreamEventRemoveCallback(stream->st); virStreamEventRemoveCallback(stream->st);
virStreamAbort(stream->st); virStreamAbort(stream->st);
} }
...@@ -493,6 +494,7 @@ daemonRemoveAllClientStreams(daemonClientStream *stream) ...@@ -493,6 +494,7 @@ daemonRemoveAllClientStreams(daemonClientStream *stream)
tmp = stream->next; tmp = stream->next;
if (!stream->closed) { if (!stream->closed) {
stream->closed = true;
virStreamEventRemoveCallback(stream->st); virStreamEventRemoveCallback(stream->st);
virStreamAbort(stream->st); virStreamAbort(stream->st);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册