Remove 10 minute buffer to token expiration (#214)
Co-authored-by: Zachary Benamram <zacharybenamram@blend.com>
This commit is contained in:
parent
be25715e1e
commit
df99f394b4
|
|
@ -84,7 +84,7 @@ func (c *Client) GetRegistrationToken(ctx context.Context, org, repo, name strin
|
|||
key := getRegistrationKey(org, repo)
|
||||
rt, ok := c.regTokens[key]
|
||||
|
||||
if ok && rt.GetExpiresAt().After(time.Now().Add(-10*time.Minute)) {
|
||||
if ok && rt.GetExpiresAt().After(time.Now()) {
|
||||
return rt, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue