fix rcache ttl

This commit is contained in:
yandd 2019-10-30 14:01:51 +08:00 committed by GitHub
parent dab0f3223f
commit f9c639af4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}