mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-30 10:10:44 +02:00
fix(registry/cache): do not watch when ttl=0 eg: some custom registry no s… (#2580)
Co-authored-by: keep <keep@pa.com>
This commit is contained in:
parent
24dfcef49a
commit
c25dee7c8a
2
registry/cache/cache.go
vendored
2
registry/cache/cache.go
vendored
@ -174,7 +174,7 @@ func (c *cache) get(service string) ([]*registry.Service, error) {
|
||||
c.RUnlock()
|
||||
|
||||
// check if its being watched
|
||||
if !ok {
|
||||
if c.opts.TTL > 0 && !ok {
|
||||
c.Lock()
|
||||
|
||||
// set to watched
|
||||
|
Loading…
Reference in New Issue
Block a user