afb-context: Early token change
[src/app-framework-binder.git] / 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;
+               }
        }
 }