propagate updates to local watchers
This commit is contained in:
		| @@ -734,6 +734,12 @@ func (g *gossipRegistry) Register(s *registry.Service, opts ...registry.Register | |||||||
| 		notify: nil, | 		notify: nil, | ||||||
| 	}) | 	}) | ||||||
|  |  | ||||||
|  | 	// send update to local watchers | ||||||
|  | 	g.updates <- &update{ | ||||||
|  | 		Update:  up, | ||||||
|  | 		Service: s, | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	// wait | 	// wait | ||||||
| 	<-time.After(g.interval * 2) | 	<-time.After(g.interval * 2) | ||||||
|  |  | ||||||
| @@ -770,6 +776,13 @@ func (g *gossipRegistry) Deregister(s *registry.Service) error { | |||||||
| 		notify: nil, | 		notify: nil, | ||||||
| 	}) | 	}) | ||||||
|  |  | ||||||
|  | 	// send update to local watchers | ||||||
|  | 	// send update to local watchers | ||||||
|  | 	g.updates <- &update{ | ||||||
|  | 		Update:  up, | ||||||
|  | 		Service: s, | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	// wait | 	// wait | ||||||
| 	<-time.After(g.interval * 2) | 	<-time.After(g.interval * 2) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user