提交 3cf37700 编写于 作者: D Daniel P. Berrange

Ensure stream is aborted when exiting console

After running 'virsh console' in interactive mode, there was a
missing call to virStreamAbort, which meant the server kept the
stream resources open

* tools/console.c: Abort stream when exiting
上级 57c7b40b
...@@ -90,9 +90,11 @@ static void ...@@ -90,9 +90,11 @@ static void
virConsoleShutdown(virConsolePtr con) virConsoleShutdown(virConsolePtr con)
{ {
con->quit = true; con->quit = true;
virStreamEventRemoveCallback(con->st); if (con->st) {
if (con->st) virStreamEventRemoveCallback(con->st);
virStreamAbort(con->st);
virStreamFree(con->st); virStreamFree(con->st);
}
if (con->stdinWatch != -1) if (con->stdinWatch != -1)
virEventRemoveHandle(con->stdinWatch); virEventRemoveHandle(con->stdinWatch);
if (con->stdoutWatch != -1) if (con->stdoutWatch != -1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册