Skip to content

Commit

Permalink
don't stop processing if panics happen
Browse files Browse the repository at this point in the history
  • Loading branch information
toschnabel committed Nov 15, 2024
1 parent cb42dce commit 97718cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ func New(config Config) *Cache {
func() { // Anon func to utilize defer
cache.mutex.Lock()
defer cache.mutex.Unlock()
defer func() {
if err := recover(); err != nil {
// TODO handle the error
}
}()

switch update.op {
case opMoveToFront:
Expand Down

0 comments on commit 97718cf

Please sign in to comment.