aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-ws.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-10 21:39:22 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-04-10 21:39:22 +0200
commitca9807f73646f536ac58c002d963a8bb8d245f5d (patch)
treebf673c996dd7cb9f31fdf70cefd0593a34caeb4a /src/afb-ws.c
parent80900470d00c56d2fa51fb7c3da429d09e1d9a78 (diff)
Make implementation multithread
This changes makes many improvement needed for multi-threading: - json object can't be shared across threads because get/set is not protected - event are now multithread compatible Change-Id: Id44b12c68e0fa67042b8ea44939af4edfa76270a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-ws.c')
-rw-r--r--src/afb-ws.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afb-ws.c b/src/afb-ws.c
index cc852b20..c6126100 100644
--- a/src/afb-ws.c
+++ b/src/afb-ws.c
@@ -407,7 +407,7 @@ static int aws_read(struct afb_ws *ws, size_t size)
return 0;
pfd.fd = ws->fd;
pfd.events = POLLIN;
- poll(&pfd, 1, 10);
+ poll(&pfd, 1, 10); /* TODO: make fully asynchronous websockets */
} else {
ws->buffer.size += (size_t)sz;
size -= (size_t)sz;