Fix DON'T ALWAYS CLOSE SESSION
[src/app-framework-binder.git] / 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;
                }