aboutsummaryrefslogtreecommitdiff
path: root/tests/vhost-user-bridge.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-10-18 12:24:03 +0300
committerMichael S. Tsirkin <mst@redhat.com>2016-12-16 01:14:37 +0200
commit98206d4e6b719f650b0f2d23bcd4bab83c624341 (patch)
treeb2cb1cab2e2aa9dd77ad969aaf9ad78fc27afb26 /tests/vhost-user-bridge.c
parent9652f5785e394f099dbc9188ae88860727df44ce (diff)
tests/vhost-user-bridge: do not accept more than one connection
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests/vhost-user-bridge.c')
-rw-r--r--tests/vhost-user-bridge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index 97e45d8be8..5b618f670a 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 *