[TrueCloudLab#13] pool: Renew token before it expired
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
cf9a54dcda
commit
cf64ddfb14
1 changed files with 2 additions and 1 deletions
|
@ -67,5 +67,6 @@ func (c *sessionCache) updateEpoch(newEpoch uint64) {
|
|||
|
||||
func (c *sessionCache) expired(val *cacheValue) bool {
|
||||
epoch := atomic.LoadUint64(&c.currentEpoch)
|
||||
return val.token.ExpiredAt(epoch)
|
||||
// use epoch+1 (clear cache beforehand) to prevent 'expired session token' error right after epoch tick
|
||||
return val.token.ExpiredAt(epoch + 1)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue