diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-11-07 19:25:44 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-11-07 19:25:44 +0100 |
commit | bb5d6e408b08d82b89e0b1e91e05a0e4c0226c18 (patch) | |
tree | f63a2b1d92c65209d446cedf7b4ff0abc62112a7 /src/afb-stub-ws.c | |
parent | 9fcc6c5d9cb59065e57fa24a80a8912516c8c20c (diff) |
afb-stub-ws: autoclose session on disconnection
Change-Id: If46ca2fa34a080b7087edb4e0da109c5ee85b14f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-stub-ws.c')
-rw-r--r-- | src/afb-stub-ws.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afb-stub-ws.c b/src/afb-stub-ws.c index d5355ff8..740a8575 100644 --- a/src/afb-stub-ws.c +++ b/src/afb-stub-ws.c @@ -533,6 +533,8 @@ static void on_call(void *closure, struct afb_proto_ws_call *call, const char *v goto unconnected; wreq->xreq.context.validated = 1; record_session(stubws, wreq->xreq.context.session); + if (wreq->xreq.context.created) + afb_session_set_autoclose(wreq->xreq.context.session, 1); /* makes the call */ wreq->xreq.cred = afb_cred_addref(stubws->cred); |