Skip to content

Commit 7bc64f4

Browse files
authored
oauth2: fix token expires time not updated (#3455)
Signed-off-by: Jeff Luo <[email protected]>
1 parent 6998e01 commit 7bc64f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/flb_oauth2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ char *flb_oauth2_token_get(struct flb_oauth2 *ctx)
390390
flb_info("[oauth2] access token from '%s:%s' retrieved",
391391
ctx->host, ctx->port);
392392
flb_http_client_destroy(c);
393+
ctx->issued = time(NULL);
394+
ctx->expires = ctx->issued + ctx->expires_in;
393395
return ctx->access_token;
394396
}
395397
}

0 commit comments

Comments
 (0)