Fix DON'T ALWAYS CLOSE SESSION
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 23 May 2016 07:27:21 +0000 (09:27 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 23 May 2016 07:27:21 +0000 (09:27 +0200)
Change-Id: I93439f9d111598d8917e7fb3eeb8434d29cf877a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-context.c

index 48787f7..a7010db 100644 (file)
@@ -74,7 +74,7 @@ void afb_context_disconnect(struct afb_context *context)
                        ctxClientSetLOA (context->session, context->loa_out);
                        context->loa_changed = 1;
                }
-               if (!context->closed) {
+               if (context->closing && !context->closed) {
                        ctxClientClose(context->session);
                        context->closed = 1;
                }