Code Review
/
src
/
app-framework-binder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
e52a48e
)
fix bug in websocket client
author
José Bollo
<jose.bollo@iot.bzh>
Wed, 18 May 2016 08:05:01 +0000
(10:05 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Wed, 18 May 2016 08:05:01 +0000
(10:05 +0200)
Change-Id: I45c44f31c02ac81dc41127fe35024a57b8d4be33
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-ws-client.c
patch
|
blob
|
history
diff --git
a/src/afb-ws-client.c
b/src/afb-ws-client.c
index
2569d13
..
32f8778
100644
(file)
--- a/
src/afb-ws-client.c
+++ b/
src/afb-ws-client.c
@@
-26,6
+26,7
@@
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
+#include <fcntl.h>
#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);