propagate updates to local watchers

This commit is contained in:
Asim Aslam 2019-06-18 14:42:56 +01:00
parent ed54384bf4
commit 6459cdfc21

View File

@ -734,6 +734,12 @@ func (g *gossipRegistry) Register(s *registry.Service, opts ...registry.Register
notify: nil,
})
// send update to local watchers
g.updates <- &update{
Update: up,
Service: s,
}
// wait
<-time.After(g.interval * 2)
@ -770,6 +776,13 @@ func (g *gossipRegistry) Deregister(s *registry.Service) error {
notify: nil,
})
// send update to local watchers
// send update to local watchers
g.updates <- &update{
Update: up,
Service: s,
}
// wait
<-time.After(g.interval * 2)