Remove 10 minute buffer to token expiration (#214)

Co-authored-by: Zachary Benamram <zacharybenamram@blend.com>
This commit is contained in:
ZacharyBenamram
2020-11-29 16:03:27 -08:00
committed by GitHub
parent be25715e1e
commit df99f394b4

View File

@@ -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
}