Skip to content

Commit

Permalink
🐛 panic: unaligned 64-bit atomic operation [32 bit machines] gofiber#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Aug 22, 2021
1 parent fc1169b commit ccc4e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type Storage struct {
}

type item struct {
v interface{} // val
e uint64 // exp
v interface{} // val
}

func New() *Storage {
Expand Down Expand Up @@ -45,7 +45,7 @@ func (s *Storage) Set(key string, val interface{}, ttl time.Duration) {
exp = uint64(ttl.Seconds()) + atomic.LoadUint64(&s.ts)
}
s.Lock()
s.data[key] = item{val, exp}
s.data[key] = item{exp, val}
s.Unlock()
}

Expand Down

0 comments on commit ccc4e0a

Please sign in to comment.