提交 0d572afd 编写于 作者: M Marc-André Lureau 提交者: Michael S. Tsirkin

vhost-user: disconnect on start failure

If the backend failed to start (for example feature negociation failed),
do not exit, but disconnect the char device instead. Slightly more
robust for reconnect case.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: NYuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: NYuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: NVictor Kaplansky <victork@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 7d9d17f7
......@@ -202,7 +202,8 @@ static void net_vhost_user_event(void *opaque, int event)
s->watch = qemu_chr_fe_add_watch(s->chr, G_IO_HUP,
net_vhost_user_watch, s);
if (vhost_user_start(queues, ncs) < 0) {
exit(1);
qemu_chr_disconnect(s->chr);
return;
}
qmp_set_link(name, true, &err);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册