aboutsummaryrefslogtreecommitdiff
path: root/qga/channel-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'qga/channel-posix.c')
-rw-r--r--qga/channel-posix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index 465d688..9ccc8b7 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -28,6 +28,7 @@ static gboolean ga_channel_listen_accept(GIOChannel *channel,
GAChannel *c = data;
int ret, client_fd;
bool accepted = false;
+ Error *err = NULL;
g_assert(channel != NULL);
@@ -36,7 +37,11 @@ static gboolean ga_channel_listen_accept(GIOChannel *channel,
g_warning("error converting fd to gsocket: %s", strerror(errno));
goto out;
}
- qemu_socket_set_nonblock(client_fd);
+ if (!qemu_set_blocking(client_fd, false, &err)) {
+ g_warning("%s", error_get_pretty(err));
+ error_free(err);
+ goto out;
+ }
ret = ga_channel_client_add(c, client_fd);
if (ret) {
g_warning("error setting up connection");