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);
}
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)
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);
}
}