summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-23 09:27:21 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-23 09:27:21 +0200
commitad9cee7d6e86ba4497ffb09b4acb3b2c07b42a12 (patch)
tree2af389becb8561f4e3cd7354918d2de29bd98e4d
parentf3a1fb9e40f2d609d128b7a0b3eb3e963cdea0b5 (diff)
Fix DON'T ALWAYS CLOSE SESSION
Change-Id: I93439f9d111598d8917e7fb3eeb8434d29cf877a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afb-context.c b/src/afb-context.c
index 48787f79..a7010dbb 100644
--- a/src/afb-context.c
+++ b/src/afb-context.c
@@ -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;
}