Remove 10 minute buffer to token expiration (#214)

Co-authored-by: Zachary Benamram <[email protected]>
This commit is contained in:
ZacharyBenamram
2020-11-30 09:03:27 +09:00
committed by GitHub
co-authored by Zachary Benamram
parent be25715e1e
commit df99f394b4
+1 -1
View File
@@ -84,7 +84,7 @@ func (c *Client) GetRegistrationToken(ctx context.Context, org, repo, name strin
key := getRegistrationKey(org, repo) key := getRegistrationKey(org, repo)
rt, ok := c.regTokens[key] 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 return rt, nil
} }