vhost-user: fix the reconnect error
authorLi Feng <fengli@smartx.com>
Thu, 23 Nov 2023 05:54:11 +0000 (13:54 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 2 Dec 2023 20:56:49 +0000 (15:56 -0500)
commit298d4f892e745cfb8a33b5ed2feaaab271f6e50c
tree751f4bff111a6cc8223ddd64f9d2e87dbe74baac
parent2d37fe9e5e61b04bddbed00dbb7436e61a01c115
vhost-user: fix the reconnect error

If the error occurs in vhost_dev_init, the value of s->connected is set to true
in advance, and there is no chance to enter this function execution again
in the future.

Signed-off-by: Li Feng <fengli@smartx.com>
Message-Id: <20231123055431.217792-2-fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/block/vhost-user-blk.c
hw/scsi/vhost-user-scsi.c
hw/virtio/vhost-user-gpio.c