afb-context: Early token change
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 15 Feb 2018 15:50:31 +0000 (16:50 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 15 Feb 2018 16:23:33 +0000 (17:23 +0100)
Change-Id: If27d84a702513b92f08c97ef91bf8cf89b5af238
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-context.c

index c2649a4..3c0b82c 100644 (file)
@@ -148,6 +148,10 @@ void afb_context_refresh(struct afb_context *context)
        else {
                assert(context->validated);
                context->refreshing = 1;
+               if (!context->refreshed) {
+                       afb_session_new_token (context->session);
+                       context->refreshed = 1;
+               }
        }
 }