X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-ws.c;h=1049a07be512a5475f3f846d3941a190db9ba273;hb=677813c6a26eca5629ef8201fd0616511400a99e;hp=e81306a390e4235731b279fed62b44c2f6361371;hpb=2f585aedc463109b3d59ad63a9a6c82f324dd500;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-ws.c b/src/afb-api-ws.c index e81306a3..1049a07b 100644 --- a/src/afb-api-ws.c +++ b/src/afb-api-ws.c @@ -1023,6 +1023,8 @@ static void api_ws_server_accept(struct api_ws *api) lenaddr = (socklen_t)sizeof addr; client->fd = accept(api->fd, &addr, &lenaddr); if (client->fd >= 0) { + fcntl(client->fd, F_SETFD, FD_CLOEXEC); + fcntl(client->fd, F_SETFL, O_NONBLOCK); client->ws = afb_ws_create(afb_common_get_event_loop(), client->fd, &api_ws_server_ws_itf, client); if (client->ws != NULL) { client->api = api->api;