diff options
Diffstat (limited to 'util/vhost-user-server.c')
| -rw-r--r-- | util/vhost-user-server.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index d805a92394..04c72a92aa 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -78,7 +78,8 @@ static void vmsg_unblock_fds(VhostUserMsg *vmsg) } for (i = 0; i < vmsg->fd_num; i++) { - qemu_socket_set_nonblock(vmsg->fds[i]); + /* TODO: handle error more gracefully than aborting */ + qemu_set_blocking(vmsg->fds[i], false, &error_abort); } } @@ -303,7 +304,8 @@ set_watch(VuDev *vu_dev, int fd, int vu_evt, vu_fd_watch->fd = fd; vu_fd_watch->cb = cb; - qemu_socket_set_nonblock(fd); + /* TODO: handle error more gracefully than aborting */ + qemu_set_blocking(fd, false, &error_abort); aio_set_fd_handler(server->ctx, fd, kick_handler, NULL, NULL, NULL, vu_fd_watch); vu_fd_watch->vu_dev = vu_dev; |