alexedwards / scs

HTTP Session Management for Go
MIT License
2.12k stars 166 forks source link

Ensure all expired tokens are removed per cleanup #133

Closed stillwondering closed 1 year ago

stillwondering commented 2 years ago

Currently, only one expired token is removed on any given cleanup run. This is because the value of Bucket.Delete() is immediately returned when looping over all expired tokens.

This PR fixes this issue and adds a test which verifies the behavior.

PS: I hope this is the intended behavior, I only stumbled upon this repo very recently ;) nice job btw!

alexedwards commented 1 year ago

@stillwondering Good catch! Thank you for the PR