vhost-user: set link down when the char device is closed

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This commit is contained in:
Wen Congyang 2015-11-11 14:53:29 +08:00 committed by Michael S. Tsirkin
parent 463b52f285
commit d39c87d707

View file

@ -188,7 +188,7 @@ static void net_vhost_user_event(void *opaque, int event)
qmp_set_link(name, true, &err);
break;
case CHR_EVENT_CLOSED:
qmp_set_link(name, true, &err);
qmp_set_link(name, false, &err);
vhost_user_stop(queues, ncs);
break;
}