aboutsummaryrefslogtreecommitdiff
path: root/ui/vdagent.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/vdagent.c')
-rw-r--r--ui/vdagent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/vdagent.c b/ui/vdagent.c
index 8a65149..4b9a1fb 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -870,8 +870,11 @@ static void vdagent_disconnect(VDAgentChardev *vd)
static void vdagent_chr_set_fe_open(struct Chardev *chr, int fe_open)
{
+ VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(chr);
+
if (!fe_open) {
trace_vdagent_close();
+ vdagent_disconnect(vd);
/* To reset_serial, we CLOSED our side. Make sure the other end knows we
* are ready again. */
qemu_chr_be_event(chr, CHR_EVENT_OPENED);