Weekend fun with memory leaks

This commit is contained in:
2025-09-07 03:02:34 +01:00
parent e17b820368
commit c9a23dc6c0
13 changed files with 353 additions and 83 deletions
+7 -2
View File
@@ -822,8 +822,13 @@ func (cm *ChunkManager) validateTokenExpiration(token string, config TokenConfig
}
if expiration != nil && time.Now().After(*expiration) {
err := fmt.Errorf("%s token is expired (expired at: %v)", config.Type, expiration.Format(time.RFC3339))
return err
// Don't reject expired tokens during retrieval - they need to be checked for grace period
// The grace period logic is handled at a higher level
cm.logger.Debugf("%s token is expired (expired at: %v) - allowing retrieval for grace period check",
config.Type, expiration.Format(time.RFC3339))
// Don't return error here - let higher level decide what to do with expired tokens
// err := fmt.Errorf("%s token is expired (expired at: %v)", config.Type, expiration.Format(time.RFC3339))
// return err
}
if expiration != nil {