aboutsummaryrefslogtreecommitdiff
path: root/decaymap
diff options
context:
space:
mode:
Diffstat (limited to 'decaymap')
-rw-r--r--decaymap/decaymap.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/decaymap/decaymap.go b/decaymap/decaymap.go
index edcbd1a..7498bb5 100644
--- a/decaymap/decaymap.go
+++ b/decaymap/decaymap.go
@@ -64,7 +64,7 @@ func (m *Impl[K, V]) Get(key K) (V, bool) {
m.lock.Lock()
// Since previously reading m.data[key], the value may have been updated.
// Delete the entry only if the expiry time is still the same.
- if m.data[key].expiry == value.expiry {
+ if m.data[key].expiry.Equal(value.expiry) {
delete(m.data, key)
}
m.lock.Unlock()