]> git.ipfire.org Git - pakfire.git/commitdiff
client: Immediately fetch an access token when loading from store
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Jun 2025 13:06:20 +0000 (13:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Jun 2025 13:06:20 +0000 (13:06 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/client.c

index 89dfede1ca29176976e783599e846299905b471b..77ad34b026655381c2b42d33e45c08550dd6c16b 100644 (file)
@@ -332,6 +332,11 @@ static int pakfire_client_store_read(struct pakfire_client* self) {
                r = pakfire_client_set_refresh_token(self, refresh_token);
                if (r < 0)
                        goto ERROR;
+
+               // Trigger an immediate refresh
+               r = pakfire_client_auth_refresh(self);
+               if (r < 0)
+                       goto ERROR;
        }
 
 ERROR: