From 5bcb7f5efba26284fb4f26c3fe24b30a4af42060 Mon Sep 17 00:00:00 2001 From: Aleksey Myasnikov Date: Sun, 22 Oct 2023 15:07:27 +0300 Subject: [PATCH] * Changed period for re-fresh static credentials token from `1/2` to `1/10` to expiration time --- CHANGELOG.md | 2 ++ internal/credentials/static.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e017f21fe..e296fb781 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Changed period for re-fresh static credentials token from `1/2` to `1/10` to expiration time + ## v3.53.4 * Downgrade `golang.org/x/net` from `0.17.0` to `0.15.0` * Downgrade `golang.org/x/sys` from `v0.13.0` to `v0.12.0` diff --git a/internal/credentials/static.go b/internal/credentials/static.go index 53c1e1032..eb1c67844 100644 --- a/internal/credentials/static.go +++ b/internal/credentials/static.go @@ -130,7 +130,7 @@ func (c *Static) Token(ctx context.Context) (token string, err error) { return "", xerrors.WithStackTrace(err) } - c.requestAt = time.Now().Add(time.Until(expiresAt) / 2) + c.requestAt = time.Now().Add(time.Until(expiresAt) / 10) c.token = result.GetToken() return c.token, nil