fix rcache ttl

This commit is contained in:
yandd 2019-10-30 14:01:51 +08:00 committed by Vasiliy Tolstov
parent fb2dee4967
commit 537ce0a258

View File

@ -81,7 +81,7 @@ func (c *cache) isValid(services []*registry.Service, ttl time.Time) bool {
}
// time since ttl is longer than timeout
if time.Since(ttl) > c.opts.TTL {
if time.Since(ttl) > 0 {
return false
}