1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

Fix condition

This commit is contained in:
mcrakhman 2022-01-14 01:20:42 +01:00
parent 2233eac923
commit 78e1d52472
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -30,7 +30,7 @@ func (c *cache) get(k string) []net.IPAddr {
c.Lock()
defer c.Unlock()
e, contains := c.entries[k]
if !contains || time.Now().Sub(e.t) < c.ttl {
if !contains || time.Now().Sub(e.t) > c.ttl {
return nil
}
return e.addrs