From: Marc-André Lureau Date: Tue, 18 Oct 2016 09:24:03 +0000 (+0300) Subject: tests/vhost-user-bridge: do not accept more than one connection X-Git-Tag: v2.9.0-rc0~164^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98206d4e6b719f650b0f2d23bcd4bab83c624341;p=thirdparty%2Fqemu.git tests/vhost-user-bridge: do not accept more than one connection Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index 97e45d8be86..5b618f670a2 100644 --- a/tests/vhost-user-bridge.c +++ b/tests/vhost-user-bridge.c @@ -1200,6 +1200,7 @@ vubr_accept_cb(int sock, void *ctx) } DPRINT("Got connection from remote peer on sock %d\n", conn_fd); dispatcher_add(&dev->dispatcher, conn_fd, ctx, vubr_receive_cb); + dispatcher_remove(&dev->dispatcher, sock); } static VubrDev *