From: José Bollo Date: Wed, 18 May 2016 08:05:01 +0000 (+0200) Subject: fix bug in websocket client X-Git-Tag: blowfish_2.0.1~107 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=b4d45c6cbdd3d98706e16303dd7c55a0a0713a1f;p=src%2Fapp-framework-binder.git fix bug in websocket client Change-Id: I45c44f31c02ac81dc41127fe35024a57b8d4be33 Signed-off-by: José Bollo --- diff --git a/src/afb-ws-client.c b/src/afb-ws-client.c index 2569d135..32f8778e 100644 --- a/src/afb-ws-client.c +++ b/src/afb-ws-client.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "afb-wsj1.h" @@ -365,8 +366,10 @@ struct afb_wsj1 *afb_ws_client_connect_wsj1(const char *uri, struct afb_wsj1_itf rc = negociate(fd, proto_json1, path, xhost); if (rc == 0) { result = afb_wsj1_create(fd, itf, closure); - if (result != NULL) + if (result != NULL) { + fcntl(fd, F_SETFL, O_NONBLOCK); break; + } } } close(fd);