mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
Remove 10 minute buffer to token expiration (#214)
Co-authored-by: Zachary Benamram <zacharybenamram@blend.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user