sc = malloc(sizeof *sc);
if (!sc) {
-
+ callback(cb_closure, 1, afb_msg_json_internal_error());
} else {
sc->callback = callback;
sc->closure = cb_closure;
__atomic_add_fetch(&stubws->refcount, 1, __ATOMIC_RELAXED);
}
-/*
-static void client_disconnect(struct afb_stub_ws *stubws)
-{
- if (stubws->fd >= 0) {
- afb_ws_destroy(stubws->ws);
- stubws->ws = NULL;
- close(stubws->fd);
- stubws->fd = -1;
- }
-}
-*/
-