diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-04-08 10:29:54 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-04-08 10:29:54 +0200 |
commit | 6ea1d50ab6571551e1d0379940349911956c97ee (patch) | |
tree | e96a3c077a0b39675a693dee202fecd60c1946a3 /src/afb-ws.c | |
parent | 54b2652e94cfa7840dbebcba46edd5459e7c6e86 (diff) |
new websocket handling
Change-Id: I71fc5ff0412af6badce77485c98016916c56d235
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-ws.c')
-rw-r--r-- | src/afb-ws.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afb-ws.c b/src/afb-ws.c index 3dae3390..49a314a6 100644 --- a/src/afb-ws.c +++ b/src/afb-ws.c @@ -116,8 +116,6 @@ void afb_ws_disconnect(struct afb_ws *ws) struct websock *wsi = ws->ws; ws->up = NULL; ws->ws = NULL; - upoll_on_hangup(up, NULL); - upoll_on_readable(up, NULL); upoll_close(up); websock_destroy(wsi); } @@ -162,10 +160,12 @@ static void aws_on_readable(struct afb_ws *ws) static void aws_on_hangup(struct afb_ws *ws) { + afb_ws_disconnect(ws); } static void aws_disconnect(struct afb_ws *ws) { + afb_ws_disconnect(ws); } static inline struct buf aws_pick_buffer(struct afb_ws *ws) @@ -204,7 +204,7 @@ static void aws_on_close(struct afb_ws *ws, uint16_t code, size_t size) else { aws_read(ws, size); b = aws_pick_buffer(ws); - ws->itf->on_close(ws, code, b.buffer, b.size); + ws->itf->on_close(ws->closure, code, b.buffer, b.size); } } |